<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-99.9.9">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Fastmath documentation – Random</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
  width: 0.8em;
  margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 
  vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
  { counter-reset: source-line 0; }
pre.numberSource code > span
  { position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
  { content: counter(source-line);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; display: inline-block;
    -webkit-touch-callout: none; -webkit-user-select: none;
    -khtml-user-select: none; -moz-user-select: none;
    -ms-user-select: none; user-select: none;
    padding: 0 4px; width: 4em;
  }
pre.numberSource { margin-left: 3em;  padding-left: 4px; }
div.sourceCode
  {   }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
</style>


<script src="site_libs/quarto-nav/quarto-nav.js"></script>
<script src="site_libs/quarto-nav/headroom.min.js"></script>
<script src="site_libs/clipboard/clipboard.min.js"></script>
<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./stats.html" rel="next">
<link href="./vector_matrix.html" rel="prev">
<link href="./clay/resources/favicon.png" rel="icon" type="image/png">
<script src="site_libs/quarto-html/quarto.js"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="site_libs/quarto-html/anchor.min.js"></script>
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
  "location": "sidebar",
  "copy-button": false,
  "collapse-after": 3,
  "panel-placement": "start",
  "type": "textbox",
  "limit": 50,
  "keyboard-shortcut": [
    "f",
    "/",
    "s"
  ],
  "show-item-context": false,
  "language": {
    "search-no-results-text": "No results",
    "search-matching-documents-text": "matching documents",
    "search-copy-link-title": "Copy link to search",
    "search-hide-matches-text": "Hide additional matches",
    "search-more-match-text": "more match in this document",
    "search-more-matches-text": "more matches in this document",
    "search-clear-button-title": "Clear",
    "search-text-placeholder": "",
    "search-detached-cancel-button-title": "Cancel",
    "search-submit-button-title": "Submit",
    "search-label": "Search"
  }
}</script>

  <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
  <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>

<script type="text/javascript">
const typesetMath = (el) => {
  if (window.MathJax) {
    // MathJax Typeset
    window.MathJax.typeset([el]);
  } else if (window.katex) {
    // KaTeX Render
    var mathElements = el.getElementsByClassName("math");
    var macros = [];
    for (var i = 0; i < mathElements.length; i++) {
      var texText = mathElements[i].firstChild;
      if (mathElements[i].tagName == "SPAN") {
        window.katex.render(texText.data, mathElements[i], {
          displayMode: mathElements[i].classList.contains('display'),
          throwOnError: false,
          macros: macros,
          fleqn: false
        });
      }
    }
  }
}
window.Quarto = {
  typesetMath
};
</script>

</head>

<body class="nav-sidebar floating">

<div id="quarto-search-results"></div>
  <header id="quarto-header" class="headroom fixed-top">
  <nav class="quarto-secondary-nav">
    <div class="container-fluid d-flex">
      <button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
        <i class="bi bi-layout-text-sidebar-reverse"></i>
      </button>
        <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./random.html">Random</a></li></ol></nav>
        <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">      
        </a>
      <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
        <i class="bi bi-search"></i>
      </button>
    </div>
  </nav>
</header>
<!-- content -->
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<!-- sidebar -->
  <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto">
    <div class="pt-lg-2 mt-2 text-left sidebar-header">
    <div class="sidebar-title mb-0 py-0">
      <a href="./">Fastmath documentation</a> 
    </div>
      </div>
        <div class="mt-2 flex-shrink-0 align-items-center">
        <div class="sidebar-search">
        <div id="quarto-search" class="" title="Search"></div>
        </div>
        </div>
    <div class="sidebar-menu-container"> 
    <ul class="list-unstyled mt-1">
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./index.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Preface</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./core.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Core</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./vector_matrix.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Vectors and matrices</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./random.html" class="sidebar-item-text sidebar-link active">
 <span class="menu-text">Random</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./stats.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Statistics</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./polynomials.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Polynomials</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./special.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Special functions</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./calculus.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Calculus</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./interpolation.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Interpolation</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./optimization.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Optimization</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./transform.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Transforms</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./ml.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Machine Learning</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./complex_quaternions.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Complex numbers and quaternions</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./easings.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Easings</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./fields.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Vector fields</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./efloat.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">EFloat</span></a>
  </div>
</li>
    </ul>
    </div>
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
    <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
        <nav id="TOC" role="doc-toc" class="toc-active">
    <h2 id="toc-title">Table of contents</h2>
   
  <ul>
  <li><a href="#common-functions" id="toc-common-functions" class="nav-link active" data-scroll-target="#common-functions">Common functions</a>
  <ul>
  <li><a href="#random-number-generation" id="toc-random-number-generation" class="nav-link" data-scroll-target="#random-number-generation">Random number generation</a></li>
  <li><a href="#sampling" id="toc-sampling" class="nav-link" data-scroll-target="#sampling">Sampling</a></li>
  <li><a href="#seed" id="toc-seed" class="nav-link" data-scroll-target="#seed">Seed</a></li>
  </ul></li>
  <li><a href="#prng" id="toc-prng" class="nav-link" data-scroll-target="#prng">PRNG</a>
  <ul>
  <li><a href="#functions" id="toc-functions" class="nav-link" data-scroll-target="#functions">Functions</a></li>
  <li><a href="#sampling-1" id="toc-sampling-1" class="nav-link" data-scroll-target="#sampling-1">Sampling</a></li>
  <li><a href="#seed-1" id="toc-seed-1" class="nav-link" data-scroll-target="#seed-1">Seed</a></li>
  <li><a href="#default-prng" id="toc-default-prng" class="nav-link" data-scroll-target="#default-prng">Default PRNG</a></li>
  </ul></li>
  <li><a href="#distributions" id="toc-distributions" class="nav-link" data-scroll-target="#distributions">Distributions</a>
  <ul>
  <li><a href="#functions-1" id="toc-functions-1" class="nav-link" data-scroll-target="#functions-1">Functions</a>
  <ul>
  <li><a href="#examples" id="toc-examples" class="nav-link" data-scroll-target="#examples">Examples</a>
  <ul class="collapse">
  <li><a href="#log-logistic-univariate-continuous" id="toc-log-logistic-univariate-continuous" class="nav-link" data-scroll-target="#log-logistic-univariate-continuous">Log-logistic, univariate continuous</a></li>
  <li><a href="#dirichlet-multivariate-continuous" id="toc-dirichlet-multivariate-continuous" class="nav-link" data-scroll-target="#dirichlet-multivariate-continuous">Dirichlet, multivariate continuous</a></li>
  <li><a href="#poisson-univariate-discrete" id="toc-poisson-univariate-discrete" class="nav-link" data-scroll-target="#poisson-univariate-discrete">Poisson, univariate discrete</a></li>
  </ul></li>
  <li><a href="#pdf-integration" id="toc-pdf-integration" class="nav-link" data-scroll-target="#pdf-integration">PDF integration</a></li>
  </ul></li>
  <li><a href="#sampling-2" id="toc-sampling-2" class="nav-link" data-scroll-target="#sampling-2">Sampling</a></li>
  <li><a href="#prng-and-seed" id="toc-prng-and-seed" class="nav-link" data-scroll-target="#prng-and-seed">PRNG and seed</a></li>
  <li><a href="#default-normal" id="toc-default-normal" class="nav-link" data-scroll-target="#default-normal">Default Normal</a></li>
  <li><a href="#univariate-cont." id="toc-univariate-cont." class="nav-link" data-scroll-target="#univariate-cont.">Univariate, cont.</a>
  <ul>
  <li><a href="#anderson-darling" id="toc-anderson-darling" class="nav-link" data-scroll-target="#anderson-darling">Anderson-Darling</a></li>
  <li><a href="#beta" id="toc-beta" class="nav-link" data-scroll-target="#beta">Beta</a></li>
  <li><a href="#cauchy" id="toc-cauchy" class="nav-link" data-scroll-target="#cauchy">Cauchy</a></li>
  <li><a href="#chi" id="toc-chi" class="nav-link" data-scroll-target="#chi">Chi</a></li>
  <li><a href="#chi-squared" id="toc-chi-squared" class="nav-link" data-scroll-target="#chi-squared">Chi-squared</a></li>
  <li><a href="#chi-squared-noncentral" id="toc-chi-squared-noncentral" class="nav-link" data-scroll-target="#chi-squared-noncentral">Chi-squared noncentral</a></li>
  <li><a href="#cramer-von-mises" id="toc-cramer-von-mises" class="nav-link" data-scroll-target="#cramer-von-mises">Cramer-von Mises</a></li>
  <li><a href="#erlang" id="toc-erlang" class="nav-link" data-scroll-target="#erlang">Erlang</a></li>
  <li><a href="#ex-gaussian" id="toc-ex-gaussian" class="nav-link" data-scroll-target="#ex-gaussian">ex-Gaussian</a></li>
  <li><a href="#exponential" id="toc-exponential" class="nav-link" data-scroll-target="#exponential">Exponential</a></li>
  <li><a href="#f" id="toc-f" class="nav-link" data-scroll-target="#f">F</a></li>
  <li><a href="#fatigue-life" id="toc-fatigue-life" class="nav-link" data-scroll-target="#fatigue-life">Fatigue life</a></li>
  <li><a href="#folded-normal" id="toc-folded-normal" class="nav-link" data-scroll-target="#folded-normal">Folded Normal</a></li>
  <li><a href="#frechet" id="toc-frechet" class="nav-link" data-scroll-target="#frechet">Frechet</a></li>
  <li><a href="#gamma" id="toc-gamma" class="nav-link" data-scroll-target="#gamma">Gamma</a></li>
  <li><a href="#gumbel" id="toc-gumbel" class="nav-link" data-scroll-target="#gumbel">Gumbel</a></li>
  <li><a href="#half-cauchy" id="toc-half-cauchy" class="nav-link" data-scroll-target="#half-cauchy">Half Cauchy</a></li>
  <li><a href="#half-normal" id="toc-half-normal" class="nav-link" data-scroll-target="#half-normal">Half Normal</a></li>
  <li><a href="#hyperbolic-secant" id="toc-hyperbolic-secant" class="nav-link" data-scroll-target="#hyperbolic-secant">Hyperbolic secant</a></li>
  <li><a href="#hypoexponential" id="toc-hypoexponential" class="nav-link" data-scroll-target="#hypoexponential">Hypoexponential</a></li>
  <li><a href="#hypoexponential-equal" id="toc-hypoexponential-equal" class="nav-link" data-scroll-target="#hypoexponential-equal">Hypoexponential equal</a></li>
  <li><a href="#inverse-gamma" id="toc-inverse-gamma" class="nav-link" data-scroll-target="#inverse-gamma">Inverse Gamma</a></li>
  <li><a href="#inverse-gaussian" id="toc-inverse-gaussian" class="nav-link" data-scroll-target="#inverse-gaussian">Inverse Gaussian</a></li>
  <li><a href="#johnson-sb" id="toc-johnson-sb" class="nav-link" data-scroll-target="#johnson-sb">Johnson Sb</a></li>
  <li><a href="#johnson-sl" id="toc-johnson-sl" class="nav-link" data-scroll-target="#johnson-sl">Johnson Sl</a></li>
  <li><a href="#johnson-su" id="toc-johnson-su" class="nav-link" data-scroll-target="#johnson-su">Johnson Su</a></li>
  <li><a href="#kolmogorov" id="toc-kolmogorov" class="nav-link" data-scroll-target="#kolmogorov">Kolmogorov</a></li>
  <li><a href="#kolmogorov-smirnov" id="toc-kolmogorov-smirnov" class="nav-link" data-scroll-target="#kolmogorov-smirnov">Kolmogorov-Smirnov</a></li>
  <li><a href="#kolmogorov-smirnov-1" id="toc-kolmogorov-smirnov-1" class="nav-link" data-scroll-target="#kolmogorov-smirnov-1">Kolmogorov-Smirnov+</a></li>
  <li><a href="#laplace" id="toc-laplace" class="nav-link" data-scroll-target="#laplace">Laplace</a></li>
  <li><a href="#levy" id="toc-levy" class="nav-link" data-scroll-target="#levy">Levy</a></li>
  <li><a href="#log-logistic" id="toc-log-logistic" class="nav-link" data-scroll-target="#log-logistic">Log Logistic</a></li>
  <li><a href="#log-normal" id="toc-log-normal" class="nav-link" data-scroll-target="#log-normal">Log Normal</a></li>
  <li><a href="#logistic" id="toc-logistic" class="nav-link" data-scroll-target="#logistic">Logistic</a></li>
  <li><a href="#nakagami" id="toc-nakagami" class="nav-link" data-scroll-target="#nakagami">Nakagami</a></li>
  <li><a href="#normal" id="toc-normal" class="nav-link" data-scroll-target="#normal">Normal</a></li>
  <li><a href="#normal-inverse-gaussian" id="toc-normal-inverse-gaussian" class="nav-link" data-scroll-target="#normal-inverse-gaussian">Normal-Inverse Gaussian</a></li>
  <li><a href="#pareto" id="toc-pareto" class="nav-link" data-scroll-target="#pareto">Pareto</a></li>
  <li><a href="#pearson-vi" id="toc-pearson-vi" class="nav-link" data-scroll-target="#pearson-vi">Pearson VI</a></li>
  <li><a href="#power" id="toc-power" class="nav-link" data-scroll-target="#power">Power</a></li>
  <li><a href="#rayleigh" id="toc-rayleigh" class="nav-link" data-scroll-target="#rayleigh">Rayleigh</a></li>
  <li><a href="#reciprocal-sqrt" id="toc-reciprocal-sqrt" class="nav-link" data-scroll-target="#reciprocal-sqrt">Reciprocal Sqrt</a></li>
  <li><a href="#students-t" id="toc-students-t" class="nav-link" data-scroll-target="#students-t">Student’s t</a></li>
  <li><a href="#triangular" id="toc-triangular" class="nav-link" data-scroll-target="#triangular">Triangular</a></li>
  <li><a href="#uniform" id="toc-uniform" class="nav-link" data-scroll-target="#uniform">Uniform</a></li>
  <li><a href="#watson-g" id="toc-watson-g" class="nav-link" data-scroll-target="#watson-g">Watson G</a></li>
  <li><a href="#watson-u" id="toc-watson-u" class="nav-link" data-scroll-target="#watson-u">Watson U</a></li>
  <li><a href="#weibull" id="toc-weibull" class="nav-link" data-scroll-target="#weibull">Weibull</a></li>
  <li><a href="#zero-adjusted-gamma-zaga" id="toc-zero-adjusted-gamma-zaga" class="nav-link" data-scroll-target="#zero-adjusted-gamma-zaga">Zero adjusted Gamma (zaga)</a></li>
  </ul></li>
  <li><a href="#univariate-discr." id="toc-univariate-discr." class="nav-link" data-scroll-target="#univariate-discr.">Univariate, discr.</a>
  <ul>
  <li><a href="#beta-binomial-bb" id="toc-beta-binomial-bb" class="nav-link" data-scroll-target="#beta-binomial-bb">Beta Binomial (bb)</a></li>
  <li><a href="#bernoulli" id="toc-bernoulli" class="nav-link" data-scroll-target="#bernoulli">Bernoulli</a></li>
  <li><a href="#binomial" id="toc-binomial" class="nav-link" data-scroll-target="#binomial">Binomial</a></li>
  <li><a href="#fishers-noncentral-hypergeometric" id="toc-fishers-noncentral-hypergeometric" class="nav-link" data-scroll-target="#fishers-noncentral-hypergeometric">Fisher’s noncentral hypergeometric</a></li>
  <li><a href="#geometric" id="toc-geometric" class="nav-link" data-scroll-target="#geometric">Geometric</a></li>
  <li><a href="#hypergeometric" id="toc-hypergeometric" class="nav-link" data-scroll-target="#hypergeometric">Hypergeometric</a></li>
  <li><a href="#logarithmic" id="toc-logarithmic" class="nav-link" data-scroll-target="#logarithmic">Logarithmic</a></li>
  <li><a href="#negative-binomial" id="toc-negative-binomial" class="nav-link" data-scroll-target="#negative-binomial">Negative binomial</a></li>
  <li><a href="#pascal" id="toc-pascal" class="nav-link" data-scroll-target="#pascal">Pascal</a></li>
  <li><a href="#poisson" id="toc-poisson" class="nav-link" data-scroll-target="#poisson">Poisson</a></li>
  <li><a href="#uniform-1" id="toc-uniform-1" class="nav-link" data-scroll-target="#uniform-1">Uniform</a></li>
  <li><a href="#zero-adjusted-beta-binomial-zabb" id="toc-zero-adjusted-beta-binomial-zabb" class="nav-link" data-scroll-target="#zero-adjusted-beta-binomial-zabb">Zero Adjusted Beta Binomial (zabb)</a></li>
  <li><a href="#zero-adjusted-binomial-zabi" id="toc-zero-adjusted-binomial-zabi" class="nav-link" data-scroll-target="#zero-adjusted-binomial-zabi">Zero Adjusted Binomial (zabi)</a></li>
  <li><a href="#zero-adjusted-negative-binomial-zanbi" id="toc-zero-adjusted-negative-binomial-zanbi" class="nav-link" data-scroll-target="#zero-adjusted-negative-binomial-zanbi">Zero Adjusted Negative Binomial (zanbi)</a></li>
  <li><a href="#zero-inflated-beta-binomial-zibb" id="toc-zero-inflated-beta-binomial-zibb" class="nav-link" data-scroll-target="#zero-inflated-beta-binomial-zibb">Zero Inflated Beta Binomial (zibb)</a></li>
  <li><a href="#zero-inflated-binomial-zibi" id="toc-zero-inflated-binomial-zibi" class="nav-link" data-scroll-target="#zero-inflated-binomial-zibi">Zero Inflated Binomial (zibi)</a></li>
  <li><a href="#zero-inflated-negative-binomial-zinbi" id="toc-zero-inflated-negative-binomial-zinbi" class="nav-link" data-scroll-target="#zero-inflated-negative-binomial-zinbi">Zero Inflated Negative Binomial (zinbi)</a></li>
  <li><a href="#zero-inflated-poisson-zip" id="toc-zero-inflated-poisson-zip" class="nav-link" data-scroll-target="#zero-inflated-poisson-zip">Zero Inflated Poisson (zip)</a></li>
  <li><a href="#zero-inflated-poisson-type-2-zip2" id="toc-zero-inflated-poisson-type-2-zip2" class="nav-link" data-scroll-target="#zero-inflated-poisson-type-2-zip2">Zero Inflated Poisson, type 2 (zip2)</a></li>
  <li><a href="#zipf" id="toc-zipf" class="nav-link" data-scroll-target="#zipf">Zipf</a></li>
  </ul></li>
  <li><a href="#multivariate" id="toc-multivariate" class="nav-link" data-scroll-target="#multivariate">Multivariate</a>
  <ul>
  <li><a href="#dirichlet" id="toc-dirichlet" class="nav-link" data-scroll-target="#dirichlet">Dirichlet</a></li>
  <li><a href="#multi-normal" id="toc-multi-normal" class="nav-link" data-scroll-target="#multi-normal">Multi normal</a></li>
  <li><a href="#multinomial" id="toc-multinomial" class="nav-link" data-scroll-target="#multinomial">Multinomial</a></li>
  </ul></li>
  <li><a href="#mixture" id="toc-mixture" class="nav-link" data-scroll-target="#mixture">Mixture</a></li>
  <li><a href="#truncated" id="toc-truncated" class="nav-link" data-scroll-target="#truncated">Truncated</a></li>
  <li><a href="#from-data" id="toc-from-data" class="nav-link" data-scroll-target="#from-data">From data</a>
  <ul>
  <li><a href="#continuous" id="toc-continuous" class="nav-link" data-scroll-target="#continuous">Continuous</a>
  <ul class="collapse">
  <li><a href="#kernels" id="toc-kernels" class="nav-link" data-scroll-target="#kernels">Kernels</a></li>
  </ul></li>
  <li><a href="#empirical" id="toc-empirical" class="nav-link" data-scroll-target="#empirical">Empirical</a></li>
  <li><a href="#discrete" id="toc-discrete" class="nav-link" data-scroll-target="#discrete">Discrete</a>
  <ul class="collapse">
  <li><a href="#doubles" id="toc-doubles" class="nav-link" data-scroll-target="#doubles">Doubles</a></li>
  <li><a href="#integers-longs" id="toc-integers-longs" class="nav-link" data-scroll-target="#integers-longs">Integers / Longs</a></li>
  </ul></li>
  <li><a href="#categorical" id="toc-categorical" class="nav-link" data-scroll-target="#categorical">Categorical</a></li>
  </ul></li>
  </ul></li>
  <li><a href="#sequences" id="toc-sequences" class="nav-link" data-scroll-target="#sequences">Sequences</a>
  <ul>
  <li><a href="#low-discrepancy" id="toc-low-discrepancy" class="nav-link" data-scroll-target="#low-discrepancy">Low discrepancy</a></li>
  <li><a href="#sphere-and-ball" id="toc-sphere-and-ball" class="nav-link" data-scroll-target="#sphere-and-ball">Sphere and ball</a></li>
  <li><a href="#uniform-and-gaussian" id="toc-uniform-and-gaussian" class="nav-link" data-scroll-target="#uniform-and-gaussian">Uniform and Gaussian</a></li>
  </ul></li>
  <li><a href="#noise" id="toc-noise" class="nav-link" data-scroll-target="#noise">Noise</a>
  <ul>
  <li><a href="#generation" id="toc-generation" class="nav-link" data-scroll-target="#generation">Generation</a>
  <ul>
  <li><a href="#single" id="toc-single" class="nav-link" data-scroll-target="#single">Single</a></li>
  <li><a href="#fbm" id="toc-fbm" class="nav-link" data-scroll-target="#fbm">FBM</a></li>
  <li><a href="#billow" id="toc-billow" class="nav-link" data-scroll-target="#billow">Billow</a></li>
  <li><a href="#ridged-multi" id="toc-ridged-multi" class="nav-link" data-scroll-target="#ridged-multi">Ridged Multi</a></li>
  </ul></li>
  <li><a href="#predefined" id="toc-predefined" class="nav-link" data-scroll-target="#predefined">Predefined</a></li>
  <li><a href="#warping" id="toc-warping" class="nav-link" data-scroll-target="#warping">Warping</a></li>
  <li><a href="#random-configuration" id="toc-random-configuration" class="nav-link" data-scroll-target="#random-configuration">Random configuration</a></li>
  <li><a href="#discrete-noise" id="toc-discrete-noise" class="nav-link" data-scroll-target="#discrete-noise">Discrete noise</a></li>
  </ul></li>
  <li><a href="#reference" id="toc-reference" class="nav-link" data-scroll-target="#reference">Reference</a>
  <ul>
  <li><a href="#fastmath.random" id="toc-fastmath.random" class="nav-link" data-scroll-target="#fastmath.random">fastmath.random</a>
  <ul>
  <li><a href="#seq" id="toc-seq" class="nav-link" data-scroll-target="#seq">-&gt;seq</a></li>
  <li><a href="#ball-random" id="toc-ball-random" class="nav-link" data-scroll-target="#ball-random">ball-random</a></li>
  <li><a href="#billow-noise" id="toc-billow-noise" class="nav-link" data-scroll-target="#billow-noise">billow-noise</a></li>
  <li><a href="#brand" id="toc-brand" class="nav-link" data-scroll-target="#brand">brand</a></li>
  <li><a href="#brandom" id="toc-brandom" class="nav-link" data-scroll-target="#brandom">brandom</a></li>
  <li><a href="#ccdf" id="toc-ccdf" class="nav-link" data-scroll-target="#ccdf">ccdf</a></li>
  <li><a href="#cdf" id="toc-cdf" class="nav-link" data-scroll-target="#cdf">cdf</a></li>
  <li><a href="#continuous-1" id="toc-continuous-1" class="nav-link" data-scroll-target="#continuous-1">continuous?</a></li>
  <li><a href="#covariance" id="toc-covariance" class="nav-link" data-scroll-target="#covariance">covariance</a></li>
  <li><a href="#default-normal-1" id="toc-default-normal-1" class="nav-link" data-scroll-target="#default-normal-1">default-normal</a></li>
  <li><a href="#default-rng" id="toc-default-rng" class="nav-link" data-scroll-target="#default-rng">default-rng</a></li>
  <li><a href="#dimensions" id="toc-dimensions" class="nav-link" data-scroll-target="#dimensions">dimensions</a></li>
  <li><a href="#discrete-noise-1" id="toc-discrete-noise-1" class="nav-link" data-scroll-target="#discrete-noise-1">discrete-noise</a></li>
  <li><a href="#distribution" id="toc-distribution" class="nav-link" data-scroll-target="#distribution">distribution</a></li>
  <li><a href="#distribution-id" id="toc-distribution-id" class="nav-link" data-scroll-target="#distribution-id">distribution-id</a></li>
  <li><a href="#distribution-parameters" id="toc-distribution-parameters" class="nav-link" data-scroll-target="#distribution-parameters">distribution-parameters</a></li>
  <li><a href="#distribution-1" id="toc-distribution-1" class="nav-link" data-scroll-target="#distribution-1">distribution?</a></li>
  <li><a href="#distributions-list" id="toc-distributions-list" class="nav-link" data-scroll-target="#distributions-list">distributions-list</a></li>
  <li><a href="#drand" id="toc-drand" class="nav-link" data-scroll-target="#drand">drand</a></li>
  <li><a href="#drandom" id="toc-drandom" class="nav-link" data-scroll-target="#drandom">drandom</a></li>
  <li><a href="#fbm-noise" id="toc-fbm-noise" class="nav-link" data-scroll-target="#fbm-noise">fbm-noise</a></li>
  <li><a href="#flip" id="toc-flip" class="nav-link" data-scroll-target="#flip">flip</a></li>
  <li><a href="#flip-rng" id="toc-flip-rng" class="nav-link" data-scroll-target="#flip-rng">flip-rng</a></li>
  <li><a href="#flipb" id="toc-flipb" class="nav-link" data-scroll-target="#flipb">flipb</a></li>
  <li><a href="#flipb-rng" id="toc-flipb-rng" class="nav-link" data-scroll-target="#flipb-rng">flipb-rng</a></li>
  <li><a href="#frand" id="toc-frand" class="nav-link" data-scroll-target="#frand">frand</a></li>
  <li><a href="#frandom" id="toc-frandom" class="nav-link" data-scroll-target="#frandom">frandom</a></li>
  <li><a href="#grand" id="toc-grand" class="nav-link" data-scroll-target="#grand">grand</a></li>
  <li><a href="#grandom" id="toc-grandom" class="nav-link" data-scroll-target="#grandom">grandom</a></li>
  <li><a href="#icdf" id="toc-icdf" class="nav-link" data-scroll-target="#icdf">icdf</a></li>
  <li><a href="#integrate-pdf" id="toc-integrate-pdf" class="nav-link" data-scroll-target="#integrate-pdf">integrate-pdf</a></li>
  <li><a href="#irand" id="toc-irand" class="nav-link" data-scroll-target="#irand">irand</a></li>
  <li><a href="#irandom" id="toc-irandom" class="nav-link" data-scroll-target="#irandom">irandom</a></li>
  <li><a href="#jittered-sequence-generator" id="toc-jittered-sequence-generator" class="nav-link" data-scroll-target="#jittered-sequence-generator">jittered-sequence-generator</a></li>
  <li><a href="#likelihood" id="toc-likelihood" class="nav-link" data-scroll-target="#likelihood">likelihood</a></li>
  <li><a href="#log-likelihood" id="toc-log-likelihood" class="nav-link" data-scroll-target="#log-likelihood">log-likelihood</a></li>
  <li><a href="#lower-bound" id="toc-lower-bound" class="nav-link" data-scroll-target="#lower-bound">lower-bound</a></li>
  <li><a href="#lpdf" id="toc-lpdf" class="nav-link" data-scroll-target="#lpdf">lpdf</a></li>
  <li><a href="#lrand" id="toc-lrand" class="nav-link" data-scroll-target="#lrand">lrand</a></li>
  <li><a href="#lrandom" id="toc-lrandom" class="nav-link" data-scroll-target="#lrandom">lrandom</a></li>
  <li><a href="#mean" id="toc-mean" class="nav-link" data-scroll-target="#mean">mean</a></li>
  <li><a href="#means" id="toc-means" class="nav-link" data-scroll-target="#means">means</a></li>
  <li><a href="#noise-1" id="toc-noise-1" class="nav-link" data-scroll-target="#noise-1">noise</a></li>
  <li><a href="#noise-generators" id="toc-noise-generators" class="nav-link" data-scroll-target="#noise-generators">noise-generators</a></li>
  <li><a href="#noise-interpolations" id="toc-noise-interpolations" class="nav-link" data-scroll-target="#noise-interpolations">noise-interpolations</a></li>
  <li><a href="#noise-types" id="toc-noise-types" class="nav-link" data-scroll-target="#noise-types">noise-types</a></li>
  <li><a href="#observe-macro" id="toc-observe-macro" class="nav-link" data-scroll-target="#observe-macro">observe <sup><sub>MACRO</sub></sup></a></li>
  <li><a href="#observe1" id="toc-observe1" class="nav-link" data-scroll-target="#observe1">observe1</a></li>
  <li><a href="#pdf" id="toc-pdf" class="nav-link" data-scroll-target="#pdf">pdf</a></li>
  <li><a href="#probability" id="toc-probability" class="nav-link" data-scroll-target="#probability">probability</a></li>
  <li><a href="#random-noise-cfg" id="toc-random-noise-cfg" class="nav-link" data-scroll-target="#random-noise-cfg">random-noise-cfg</a></li>
  <li><a href="#random-noise-fn" id="toc-random-noise-fn" class="nav-link" data-scroll-target="#random-noise-fn">random-noise-fn</a></li>
  <li><a href="#randval-macro" id="toc-randval-macro" class="nav-link" data-scroll-target="#randval-macro">randval <sup><sub>MACRO</sub></sup></a></li>
  <li><a href="#randval-rng-macro" id="toc-randval-rng-macro" class="nav-link" data-scroll-target="#randval-rng-macro">randval-rng <sup><sub>MACRO</sub></sup></a></li>
  <li><a href="#ridgedmulti-noise" id="toc-ridgedmulti-noise" class="nav-link" data-scroll-target="#ridgedmulti-noise">ridgedmulti-noise</a></li>
  <li><a href="#rng" id="toc-rng" class="nav-link" data-scroll-target="#rng">rng</a></li>
  <li><a href="#rngs-list" id="toc-rngs-list" class="nav-link" data-scroll-target="#rngs-list">rngs-list</a></li>
  <li><a href="#roll-a-dice" id="toc-roll-a-dice" class="nav-link" data-scroll-target="#roll-a-dice">roll-a-dice</a></li>
  <li><a href="#roll-a-dice-rng" id="toc-roll-a-dice-rng" class="nav-link" data-scroll-target="#roll-a-dice-rng">roll-a-dice-rng</a></li>
  <li><a href="#sample" id="toc-sample" class="nav-link" data-scroll-target="#sample">sample</a></li>
  <li><a href="#sequence-generator" id="toc-sequence-generator" class="nav-link" data-scroll-target="#sequence-generator">sequence-generator</a></li>
  <li><a href="#sequence-generators-list" id="toc-sequence-generators-list" class="nav-link" data-scroll-target="#sequence-generators-list">sequence-generators-list</a></li>
  <li><a href="#set-seed" id="toc-set-seed" class="nav-link" data-scroll-target="#set-seed">set-seed</a></li>
  <li><a href="#set-seed-1" id="toc-set-seed-1" class="nav-link" data-scroll-target="#set-seed-1">set-seed!</a></li>
  <li><a href="#simplex" id="toc-simplex" class="nav-link" data-scroll-target="#simplex">simplex</a></li>
  <li><a href="#single-noise" id="toc-single-noise" class="nav-link" data-scroll-target="#single-noise">single-noise</a></li>
  <li><a href="#source-object" id="toc-source-object" class="nav-link" data-scroll-target="#source-object">source-object</a></li>
  <li><a href="#synced-rng" id="toc-synced-rng" class="nav-link" data-scroll-target="#synced-rng">synced-rng</a></li>
  <li><a href="#upper-bound" id="toc-upper-bound" class="nav-link" data-scroll-target="#upper-bound">upper-bound</a></li>
  <li><a href="#variance" id="toc-variance" class="nav-link" data-scroll-target="#variance">variance</a></li>
  <li><a href="#vnoise" id="toc-vnoise" class="nav-link" data-scroll-target="#vnoise">vnoise</a></li>
  <li><a href="#warp-noise-fn" id="toc-warp-noise-fn" class="nav-link" data-scroll-target="#warp-noise-fn">warp-noise-fn</a></li>
  </ul></li>
  </ul></li>
  </ul>
</nav>
    </div>
<!-- main -->
<main class="content" id="quarto-document-content">

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Random</h1>
</div>



<div class="quarto-title-meta">

    
  
    
  </div>
  


</header>


<style></style>
<style>.printedClojure .sourceCode {
  background-color: transparent;
  border-style: none;
}
</style>
<style>.clay-limit-image-width .clay-image {max-width: 100%}
.clay-side-by-side .sourceCode {margin: 0}
.clay-side-by-side {margin: 1em 0}
</style>
<script src="random_files/md-default579.js" type="text/javascript"></script>
<script src="random_files/md-default580.js" type="text/javascript"></script>
<p>Collection of functions which deal with randomness. There are four groups:</p>
<ul>
<li>random number generation</li>
<li>probability distributions</li>
<li>sequences generators</li>
<li>noise (value, gradient, simplex)</li>
</ul>
<div class="sourceClojure">
<div class="sourceCode" id="cb1"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">require</span> '[fastmath.random <span class="at">:as</span> r])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Set initial seed</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb2"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>(r/set-seed! <span class="dv">31337</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb3"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>#object[org.apache.commons.math3.random.JDKRandomGenerator <span class="bn">0x6ed43da1</span> <span class="st">"org.apache.commons.math3.random.JDKRandomGenerator@6ed43da1"</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<section id="common-functions" class="level2">
<h2 class="anchored" data-anchor-id="common-functions">Common functions</h2>
<p>List of the functions which work with PRNG and distribution objects:</p>
<section id="random-number-generation" class="level3">
<h3 class="anchored" data-anchor-id="random-number-generation">Random number generation</h3>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>irandom</code>, <code>lrandom</code>, <code>frandom</code>, <code>drandom</code></li>
</ul>
</div>
</div>
<ul>
<li><code>irandom</code>, for random integer, returns long</li>
<li><code>lrandom</code>, returns long</li>
<li><code>frandom</code>, for random float, returns boxed float</li>
<li><code>drandom</code>, random double</li>
<li>First argument should be PRNG or distribution object</li>
<li>With no additional arguments, functions return:
<ul>
<li>full range for integers and longs</li>
<li><span class="math inline">\([0,1)\)</span> for floats and doubles</li>
</ul></li>
<li>Only for PRNGs
<ul>
<li>With one additional argument, number from <span class="math inline">\([0,max)\)</span> range is returned</li>
<li>With two additional arguments, number form <span class="math inline">\([min,max)\)</span> range is returned</li>
</ul></li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb4"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(r/irandom (r/rng <span class="at">:mersenne</span>)) <span class="co">;; =&gt; -136146582</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>(r/drandom (r/rng <span class="at">:mersenne</span>) <span class="dv">0</span> <span class="dv">10</span>) <span class="co">;; =&gt; 7.199819724749066</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>For PRNGs, see more examples in PRNG &gt; Functions section.</p>
<p>For Distributions, see more examples in Distributions &gt; Functions &gt; Examples section.</p>
</section>
<section id="sampling" class="level3">
<h3 class="anchored" data-anchor-id="sampling">Sampling</h3>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>-&gt;seq</code></li>
</ul>
</div>
</div>
<p>To generate infinite lazy sequence of random values, call <code>-&gt;seq</code> on given PRNG or distribution. Second (optional) argument can limit number of returned numbers. Third (optional) argument controls sampling method (for given <code>n</code> number of samples), there are the following options:</p>
<ul>
<li><code>:antithetic</code> - random values in pairs <code>[r1,1-r1,r2,1-r2,...]</code></li>
<li><code>:uniform</code> - spacings between numbers follow uniform distribution</li>
<li><code>:systematic</code> - the same spacing with random starting point</li>
<li><code>:stratified</code> - divide <span class="math inline">\([0,1]\)</span> into <code>n</code> intervals and get random value from each subinterval</li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb5"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">3</span> (r/-&gt;seq (r/rng <span class="at">:mersenne</span>))) <span class="co">;; =&gt; (0.33389670116610515 0.4201635052312518 0.020276806884650833)</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq (r/rng <span class="at">:mersenne</span>) <span class="dv">3</span>) <span class="co">;; =&gt; (0.1818656323152903 0.3819745118175524 0.8874413006922237)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>For PRNGs, see more examples in PRNG &gt; Functions section.</p>
<p>For Distributions, see more examples in Distributions &gt; Functions &gt; Examples section.</p>
</section>
<section id="seed" class="level3">
<h3 class="anchored" data-anchor-id="seed">Seed</h3>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>set-seed!</code>, <code>set-seed</code></li>
</ul>
</div>
</div>
<ul>
<li><code>set-seed!</code> mutates object if it’s supported by underlying Java implementation, can also return newly created object.</li>
<li><code>set-seed</code> is implemented only for PRNGs currently</li>
</ul>
<p>See examples in PRNG &gt; Seed section.</p>
</section>
</section>
<section id="prng" class="level2">
<h2 class="anchored" data-anchor-id="prng">PRNG</h2>
<p>Related functions:</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>rng</code>, <code>synced-rng</code></li>
<li><code>grandom</code>, <code>brandom</code></li>
<li><code>irand</code>, <code>lrand</code>, <code>frand</code>, <code>drand</code>, <code>grand</code>, <code>brand</code></li>
<li><code>-&gt;seq</code></li>
<li><code>set-seed</code>, <code>set-seed!</code></li>
<li><code>randval</code>, <code>flip</code>, <code>flipb</code>, <code>roll-a-dice</code></li>
<li><code>randval-rng</code>, <code>flip-rng</code>, <code>flipb-rng</code>, <code>roll-a-dice-rng</code></li>
</ul>
</div>
</div>
<p>Random number generation is based on PRNG (Pseudorandom Numeber Generator) objects which are responsible for keeping the state. All PRNGs are based on Apache Commons Math 3.6.1 algorithms.</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">Algorithm</th>
<th data-quarto-table-cell-role="th">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:mersenne</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>Mersenne Twister</td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:isaac</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>ISAAC, cryptographically secure PRNG</td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well512a</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{512}-1\)</span> period, variant a</td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well1024a</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{1024}-1\)</span> period, variant a</td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well19937a</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{19937}-1\)</span> period, variant a</td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well19937c</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{19937}-1\)</span> period, variant c</td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well44497a</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{44497}-1\)</span> period, variant a</td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:well44497b</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>WELL <span class="math inline">\(2^{44497}-1\)</span> period, variant b</td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:jdk</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>java.util.Random instance, thread safe</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>To create PRNG, call <code>rng</code> with algorithm name (as a keyword) and optional seed parameter. <code>rng</code> creates a PRNG with optional seed <code>synced-rng</code> wraps PRNG to ensure thread safety</p>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb15"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>(r/rng <span class="at">:isaac</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.ISAACRandom 0x7e504710 "org.apache.commons.math3.random.ISAACRandom@7e504710"]</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>(r/rng <span class="at">:isaac</span> <span class="dv">5336</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.ISAACRandom 0x5a2c5f20 "org.apache.commons.math3.random.ISAACRandom@5a2c5f20"]</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a>(r/synced-rng (r/rng <span class="at">:isaac</span>)) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.SynchronizedRandomGenerator 0x2e1db89c "org.apache.commons.math3.random.SynchronizedRandomGenerator@2e1db89c"]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<section id="functions" class="level3">
<h3 class="anchored" data-anchor-id="functions">Functions</h3>
<p>Two additional functions are supported by PRNGs</p>
<ul>
<li><code>grandom</code>
<ul>
<li>1-arity - returns random number from Normal (Gaussian) distribution, N(0,1)</li>
<li>2-arity - N(0,stddev)</li>
<li>3-arity - N(mean, stddev)</li>
</ul></li>
<li><code>brandom</code>
<ul>
<li>1-arity - returns true/false with probability=0.5</li>
<li>2-arity - returns true with given probability</li>
</ul></li>
</ul>
<p>All examples will use Mersenne Twister PRNG with random seed</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb16"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> my-prng </span>(r/rng <span class="at">:mersenne</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb17"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>(r/irandom my-prng) <span class="co">;; =&gt; -1170441606</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>(r/irandom my-prng <span class="dv">5</span>) <span class="co">;; =&gt; 0</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a>(r/irandom my-prng <span class="dv">10</span> <span class="dv">20</span>) <span class="co">;; =&gt; 11</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a>(r/lrandom my-prng) <span class="co">;; =&gt; 7743624255826441702</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true" tabindex="-1"></a>(r/lrandom my-prng <span class="dv">5</span>) <span class="co">;; =&gt; 1</span></span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true" tabindex="-1"></a>(r/lrandom my-prng <span class="dv">10</span> <span class="dv">20</span>) <span class="co">;; =&gt; 16</span></span>
<span id="cb17-7"><a href="#cb17-7" aria-hidden="true" tabindex="-1"></a>(r/frandom my-prng) <span class="co">;; =&gt; 0.61668</span></span>
<span id="cb17-8"><a href="#cb17-8" aria-hidden="true" tabindex="-1"></a>(r/frandom my-prng <span class="fl">2.5</span>) <span class="co">;; =&gt; 0.6216237</span></span>
<span id="cb17-9"><a href="#cb17-9" aria-hidden="true" tabindex="-1"></a>(r/frandom my-prng <span class="fl">10.1</span> <span class="fl">10.11</span>) <span class="co">;; =&gt; 10.104496</span></span>
<span id="cb17-10"><a href="#cb17-10" aria-hidden="true" tabindex="-1"></a>(r/drandom my-prng) <span class="co">;; =&gt; 0.09798699295075952</span></span>
<span id="cb17-11"><a href="#cb17-11" aria-hidden="true" tabindex="-1"></a>(r/drandom my-prng <span class="fl">2.5</span>) <span class="co">;; =&gt; 0.08684209039926671</span></span>
<span id="cb17-12"><a href="#cb17-12" aria-hidden="true" tabindex="-1"></a>(r/drandom my-prng <span class="fl">10.1</span> <span class="fl">10.11</span>) <span class="co">;; =&gt; 10.103132178691665</span></span>
<span id="cb17-13"><a href="#cb17-13" aria-hidden="true" tabindex="-1"></a>(r/grandom my-prng) <span class="co">;; =&gt; -1.3550229774760765</span></span>
<span id="cb17-14"><a href="#cb17-14" aria-hidden="true" tabindex="-1"></a>(r/grandom my-prng <span class="fl">20.0</span>) <span class="co">;; =&gt; 42.30684980291382</span></span>
<span id="cb17-15"><a href="#cb17-15" aria-hidden="true" tabindex="-1"></a>(r/grandom my-prng <span class="fl">10.0</span> <span class="fl">20.0</span>) <span class="co">;; =&gt; -5.825627331308176</span></span>
<span id="cb17-16"><a href="#cb17-16" aria-hidden="true" tabindex="-1"></a>(r/brandom my-prng) <span class="co">;; =&gt; true</span></span>
<span id="cb17-17"><a href="#cb17-17" aria-hidden="true" tabindex="-1"></a>(r/brandom my-prng <span class="fl">0.01</span>) <span class="co">;; =&gt; false</span></span>
<span id="cb17-18"><a href="#cb17-18" aria-hidden="true" tabindex="-1"></a>(r/brandom my-prng <span class="fl">0.99</span>) <span class="co">;; =&gt; true</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="sampling-1" class="level3">
<h3 class="anchored" data-anchor-id="sampling-1">Sampling</h3>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb18"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">2</span> (r/-&gt;seq my-prng)) <span class="co">;; =&gt; (0.7364928783080171 0.7459180979011766)</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq my-prng <span class="dv">2</span>) <span class="co">;; =&gt; (0.7385897820549794 0.22534289762503334)</span></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq my-prng <span class="dv">5</span> <span class="at">:antithetic</span>) <span class="co">;; =&gt; (0.7753904032017882 0.2246095967982118 0.646606217042702 0.35339378295729795 0.09059579887200875)</span></span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq my-prng <span class="dv">5</span> <span class="at">:uniform</span>) <span class="co">;; =&gt; (0.2246322215775946 0.2889619056593499 0.4345685443782038 0.5766578047763047 0.5981291396129231)</span></span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq my-prng <span class="dv">5</span> <span class="at">:systematic</span>) <span class="co">;; =&gt; (0.08388649375429158 0.2838864937542916 0.48388649375429155 0.6838864937542916 0.8838864937542916)</span></span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq my-prng <span class="dv">5</span> <span class="at">:stratified</span>) <span class="co">;; =&gt; (0.10336014117433656 0.3872635735550631 0.4413850626051383 0.7099244429984433 0.9635487930776709)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="seed-1" class="level3">
<h3 class="anchored" data-anchor-id="seed-1">Seed</h3>
<p>Let’s define two copies of the same PRNG with the same seed. Second one is obtained by setting a seed new seed.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb19"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> isaac-prng </span>(r/rng <span class="at">:isaac</span> <span class="dv">9988</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb20"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> isaac-prng2 </span><span class="co">;; new instance</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a>  (r/set-seed isaac-prng <span class="dv">12345</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb21"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng <span class="dv">3</span>) <span class="co">;; =&gt; (0.2017025716542833 0.18388677470983206 0.956730341010493)</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng2 <span class="dv">3</span>) <span class="co">;; =&gt; (0.9750469483729258 0.8824640458238968 0.931330617691251)</span></span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng <span class="dv">3</span>) <span class="co">;; =&gt; (0.5016097251798766 0.9741775702598627 0.4876589891468033)</span></span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng2 <span class="dv">3</span>) <span class="co">;; =&gt; (0.7878968013812606 0.4365686819291106 0.9175915936830081)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>Let’s now reseed both PRNGs</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb22"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>(r/set-seed! isaac-prng <span class="dv">9988</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb23"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>#object[org.apache.commons.math3.random.ISAACRandom <span class="bn">0x72ae2bf4</span> <span class="st">"org.apache.commons.math3.random.ISAACRandom@72ae2bf4"</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb24"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a>(r/set-seed! isaac-prng2 <span class="dv">9988</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb25"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a>#object[org.apache.commons.math3.random.ISAACRandom <span class="bn">0x68f2c0f6</span> <span class="st">"org.apache.commons.math3.random.ISAACRandom@68f2c0f6"</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb26"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng <span class="dv">3</span>) <span class="co">;; =&gt; (0.2017025716542833 0.18388677470983206 0.956730341010493)</span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq isaac-prng2 <span class="dv">3</span>) <span class="co">;; =&gt; (0.2017025716542833 0.18388677470983206 0.956730341010493)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="default-prng" class="level3">
<h3 class="anchored" data-anchor-id="default-prng">Default PRNG</h3>
<p>There is defined one global variable <code>default-rng</code> which is synchonized <code>:jvm</code> PRNG. Following set of functions work on this particular PRNG. The are the same as <code>xrandom</code>, ie <code>(irand)</code> is the same as <code>(irandom default-rng)</code>.</p>
<ul>
<li><code>irand</code>, random integer, as long</li>
<li><code>lrand</code>, random long</li>
<li><code>frand</code>, random float as boxed Float</li>
<li><code>drand</code>, random double</li>
<li><code>grand</code>, random gaussian</li>
<li><code>brand</code>, random boolean</li>
<li><code>-&gt;seq</code>, returns infinite lazy sequence</li>
<li><code>set-seed</code>, seeds default-rng, returns new instance</li>
<li><code>set-seed!</code>, seeds default-rng and Smile’s RNG</li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb27"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a>(r/irand) <span class="co">;; =&gt; 105368218</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a>(r/irand <span class="dv">5</span>) <span class="co">;; =&gt; 3</span></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a>(r/irand <span class="dv">10</span> <span class="dv">20</span>) <span class="co">;; =&gt; 19</span></span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a>(r/lrand) <span class="co">;; =&gt; -6326787748595902987</span></span>
<span id="cb27-5"><a href="#cb27-5" aria-hidden="true" tabindex="-1"></a>(r/lrand <span class="dv">5</span>) <span class="co">;; =&gt; 4</span></span>
<span id="cb27-6"><a href="#cb27-6" aria-hidden="true" tabindex="-1"></a>(r/lrand <span class="dv">10</span> <span class="dv">20</span>) <span class="co">;; =&gt; 16</span></span>
<span id="cb27-7"><a href="#cb27-7" aria-hidden="true" tabindex="-1"></a>(r/frand) <span class="co">;; =&gt; 0.20756257</span></span>
<span id="cb27-8"><a href="#cb27-8" aria-hidden="true" tabindex="-1"></a>(r/frand <span class="fl">2.5</span>) <span class="co">;; =&gt; 0.95548046</span></span>
<span id="cb27-9"><a href="#cb27-9" aria-hidden="true" tabindex="-1"></a>(r/frand <span class="fl">10.1</span> <span class="fl">10.11</span>) <span class="co">;; =&gt; 10.105913</span></span>
<span id="cb27-10"><a href="#cb27-10" aria-hidden="true" tabindex="-1"></a>(r/drand) <span class="co">;; =&gt; 0.5293197586726303</span></span>
<span id="cb27-11"><a href="#cb27-11" aria-hidden="true" tabindex="-1"></a>(r/drand <span class="fl">2.5</span>) <span class="co">;; =&gt; 0.5856958321231587</span></span>
<span id="cb27-12"><a href="#cb27-12" aria-hidden="true" tabindex="-1"></a>(r/drand <span class="fl">10.1</span> <span class="fl">10.11</span>) <span class="co">;; =&gt; 10.10447314352286</span></span>
<span id="cb27-13"><a href="#cb27-13" aria-hidden="true" tabindex="-1"></a>(r/grand) <span class="co">;; =&gt; 2.1340019834469315</span></span>
<span id="cb27-14"><a href="#cb27-14" aria-hidden="true" tabindex="-1"></a>(r/grand <span class="fl">20.0</span>) <span class="co">;; =&gt; -33.23574732491791</span></span>
<span id="cb27-15"><a href="#cb27-15" aria-hidden="true" tabindex="-1"></a>(r/grand <span class="fl">10.0</span> <span class="fl">20.0</span>) <span class="co">;; =&gt; 11.061399646894813</span></span>
<span id="cb27-16"><a href="#cb27-16" aria-hidden="true" tabindex="-1"></a>(r/brand) <span class="co">;; =&gt; false</span></span>
<span id="cb27-17"><a href="#cb27-17" aria-hidden="true" tabindex="-1"></a>(r/brand <span class="fl">0.01</span>) <span class="co">;; =&gt; false</span></span>
<span id="cb27-18"><a href="#cb27-18" aria-hidden="true" tabindex="-1"></a>(r/brand <span class="fl">0.99</span>) <span class="co">;; =&gt; true</span></span>
<span id="cb27-19"><a href="#cb27-19" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">3</span> (r/-&gt;seq)) <span class="co">;; =&gt; (0.8820950564851541 0.8432355490117891 0.7757833765798361)</span></span>
<span id="cb27-20"><a href="#cb27-20" aria-hidden="true" tabindex="-1"></a>r/default-rng <span class="co">;; =&gt; #object[org.apache.commons.math3.random.JDKRandomGenerator 0x6ed43da1 "org.apache.commons.math3.random.JDKRandomGenerator@6ed43da1"]</span></span>
<span id="cb27-21"><a href="#cb27-21" aria-hidden="true" tabindex="-1"></a>(r/set-seed) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.JDKRandomGenerator 0x6692a0fb "org.apache.commons.math3.random.JDKRandomGenerator@6692a0fb"]</span></span>
<span id="cb27-22"><a href="#cb27-22" aria-hidden="true" tabindex="-1"></a>(r/set-seed <span class="dv">9988</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.JDKRandomGenerator 0x6a330d55 "org.apache.commons.math3.random.JDKRandomGenerator@6a330d55"]</span></span>
<span id="cb27-23"><a href="#cb27-23" aria-hidden="true" tabindex="-1"></a>(r/set-seed!) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.JDKRandomGenerator 0x6ed43da1 "org.apache.commons.math3.random.JDKRandomGenerator@6ed43da1"]</span></span>
<span id="cb27-24"><a href="#cb27-24" aria-hidden="true" tabindex="-1"></a>(r/set-seed! <span class="dv">9988</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.random.JDKRandomGenerator 0x6ed43da1 "org.apache.commons.math3.random.JDKRandomGenerator@6ed43da1"]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>Additionally there are some helpers:</p>
<ul>
<li><code>randval</code>, A macro, returns value with given probability (default true/false with prob=0.5)</li>
<li><code>flip</code>, Returns 1 with given probability (or 0)</li>
<li><code>flipb</code>, Returns true with given probability (default probability 0.5)</li>
<li><code>roll-a-dice</code>, Returns a result of rolling a n-sides dice(s)</li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb28"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a>(r/randval) <span class="co">;; =&gt; false</span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a>(r/randval <span class="fl">0.99</span>) <span class="co">;; =&gt; true</span></span>
<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a>(r/randval <span class="fl">0.01</span>) <span class="co">;; =&gt; false</span></span>
<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a>(r/randval <span class="at">:value1</span> <span class="at">:value2</span>) <span class="co">;; =&gt; :value2</span></span>
<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a>(r/randval <span class="fl">0.99</span> <span class="at">:highly-probable-value</span> <span class="at">:less-probably-value</span>) <span class="co">;; =&gt; :highly-probable-value</span></span>
<span id="cb28-6"><a href="#cb28-6" aria-hidden="true" tabindex="-1"></a>(r/randval <span class="fl">0.01</span> <span class="at">:less-probably-value</span> <span class="at">:highly-probable-value</span>) <span class="co">;; =&gt; :highly-probable-value</span></span>
<span id="cb28-7"><a href="#cb28-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> r/flip) <span class="co">;; =&gt; (0 1 1 1 0 0 1 0 0 0)</span></span>
<span id="cb28-8"><a href="#cb28-8" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flip <span class="fl">0.8</span>))) <span class="co">;; =&gt; (1 1 1 1 1 1 1 0 1 1)</span></span>
<span id="cb28-9"><a href="#cb28-9" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flip <span class="fl">0.2</span>))) <span class="co">;; =&gt; (0 0 0 0 0 0 0 0 0 0)</span></span>
<span id="cb28-10"><a href="#cb28-10" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> r/flipb) <span class="co">;; =&gt; (true true false true true false false true false true)</span></span>
<span id="cb28-11"><a href="#cb28-11" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flipb <span class="fl">0.8</span>))) <span class="co">;; =&gt; (true true false true false true true false true true)</span></span>
<span id="cb28-12"><a href="#cb28-12" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flipb <span class="fl">0.2</span>))) <span class="co">;; =&gt; (false false false false true false false false false false)</span></span>
<span id="cb28-13"><a href="#cb28-13" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice <span class="dv">6</span>) <span class="co">;; =&gt; 6</span></span>
<span id="cb28-14"><a href="#cb28-14" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice <span class="dv">100</span>) <span class="co">;; =&gt; 30</span></span>
<span id="cb28-15"><a href="#cb28-15" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice <span class="dv">10</span> <span class="dv">6</span>) <span class="co">;; =&gt; 31</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>Above helpers can accept custom PRNG</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb29"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> isaac3-prng </span>(r/rng <span class="at">:isaac</span> <span class="dv">1234</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<ul>
<li><code>randval-rng</code>, A macro, returns value with given probability (default true/false with prob=0.5)</li>
<li><code>flip-rng</code>, Returns 1 with given probability (or 0)</li>
<li><code>flipb-rng</code>, Returns true with given probability</li>
<li><code>roll-a-dice-rng</code>, Returns a result of rolling a n-sides dice(s)</li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb30"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng) <span class="co">;; =&gt; false</span></span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng <span class="fl">0.99</span>) <span class="co">;; =&gt; true</span></span>
<span id="cb30-3"><a href="#cb30-3" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng <span class="fl">0.01</span>) <span class="co">;; =&gt; false</span></span>
<span id="cb30-4"><a href="#cb30-4" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng <span class="at">:value1</span> <span class="at">:value2</span>) <span class="co">;; =&gt; :value1</span></span>
<span id="cb30-5"><a href="#cb30-5" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng <span class="fl">0.99</span> <span class="at">:highly-probable-value</span> <span class="at">:less-probably-value</span>) <span class="co">;; =&gt; :highly-probable-value</span></span>
<span id="cb30-6"><a href="#cb30-6" aria-hidden="true" tabindex="-1"></a>(r/randval-rng isaac3-prng <span class="fl">0.01</span> <span class="at">:less-probably-value</span> <span class="at">:highly-probable-value</span>) <span class="co">;; =&gt; :highly-probable-value</span></span>
<span id="cb30-7"><a href="#cb30-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flip-rng isaac3-prng))) <span class="co">;; =&gt; (0 0 0 1 1 0 0 1 0 1)</span></span>
<span id="cb30-8"><a href="#cb30-8" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flip-rng isaac3-prng <span class="fl">0.8</span>))) <span class="co">;; =&gt; (1 0 0 0 1 1 1 1 1 1)</span></span>
<span id="cb30-9"><a href="#cb30-9" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flip-rng isaac3-prng <span class="fl">0.2</span>))) <span class="co">;; =&gt; (1 0 0 0 1 0 0 0 0 1)</span></span>
<span id="cb30-10"><a href="#cb30-10" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flipb-rng isaac3-prng))) <span class="co">;; =&gt; (false false true false false true true false false true)</span></span>
<span id="cb30-11"><a href="#cb30-11" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flipb-rng isaac3-prng <span class="fl">0.8</span>))) <span class="co">;; =&gt; (false true false true true true true true false false)</span></span>
<span id="cb30-12"><a href="#cb30-12" aria-hidden="true" tabindex="-1"></a>(<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/flipb-rng isaac3-prng <span class="fl">0.2</span>))) <span class="co">;; =&gt; (false false true true false false false false false false)</span></span>
<span id="cb30-13"><a href="#cb30-13" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice-rng isaac3-prng <span class="dv">6</span>) <span class="co">;; =&gt; 1</span></span>
<span id="cb30-14"><a href="#cb30-14" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice-rng isaac3-prng <span class="dv">100</span>) <span class="co">;; =&gt; 12</span></span>
<span id="cb30-15"><a href="#cb30-15" aria-hidden="true" tabindex="-1"></a>(r/roll-a-dice-rng isaac3-prng <span class="dv">10</span> <span class="dv">6</span>) <span class="co">;; =&gt; 30</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="distributions" class="level2">
<h2 class="anchored" data-anchor-id="distributions">Distributions</h2>
<p>Collection of probability distributions.</p>
<p>Related functions:</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>distribution</code>, <code>distribution?</code>,</li>
<li><code>pdf</code>, <code>lpdf</code>, <code>observe1</code></li>
<li><code>cdf</code>, <code>ccdf</code>, <code>icdf</code></li>
<li><code>sample</code>, <code>dimensions</code>, <code>continuous?</code></li>
<li><code>log-likelihood</code>, <code>observe</code>, <code>likelihood</code></li>
<li><code>mean</code>, <code>means</code>, <code>variance</code>, <code>covariance</code></li>
<li><code>lower-bound</code>, <code>upper-bound</code></li>
<li><code>distribution-id</code>, <code>distribution-parameters</code></li>
<li><code>integrate-pdf</code></li>
</ul>
</div>
</div>
<p><code>distribution</code> is Distribution creator, a multimethod.</p>
<ul>
<li>First parameter is distribution as a <code>:key</code>.</li>
<li>Second parameter is a map with configuration.</li>
</ul>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb31"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a>(r/distribution <span class="at">:cauchy</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.distribution.CauchyDistribution 0x59c3011f "org.apache.commons.math3.distribution.CauchyDistribution@59c3011f"]</span></span>
<span id="cb31-2"><a href="#cb31-2" aria-hidden="true" tabindex="-1"></a>(r/distribution <span class="at">:cauchy</span> {<span class="at">:median</span> <span class="fl">2.0</span>, <span class="at">:scale</span> <span class="fl">2.0</span>}) <span class="co">;; =&gt; #object[org.apache.commons.math3.distribution.CauchyDistribution 0x226015a1 "org.apache.commons.math3.distribution.CauchyDistribution@226015a1"]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<section id="functions-1" class="level3">
<h3 class="anchored" data-anchor-id="functions-1">Functions</h3>
<p>Here are the quick description of available functions:</p>
<ul>
<li><code>distribution?</code>, checks if given object is a distribution</li>
<li><code>pdf</code>, probability density (for continuous) or probability mass (for discrete)</li>
<li><code>lpdf</code>, log of pdf</li>
<li><code>observe1</code>, log of pdf, alias of lpdf</li>
<li><code>cdf</code>, cumulative density or probability, distribution</li>
<li><code>ccdf</code>, complementary cdf, 1-cdf</li>
<li><code>icdf</code>, inverse cdf, quantiles</li>
<li><code>sample</code>, returns random sample</li>
<li><code>dimensions</code>, number of dimensions</li>
<li><code>continuous?</code>, is distribution continuous (true) or discrete (false)?</li>
<li><code>log-likelihood</code>, sum of lpdfs for given seq of samples</li>
<li><code>observe</code>, macro version of log-likelihood</li>
<li><code>likelihood</code>, exp of log-likelihood</li>
<li><code>mean</code>, distribution mean</li>
<li><code>means</code>, distribution means for multivariate distributions</li>
<li><code>variance</code>, distribution variance</li>
<li><code>covariance</code>, covariance for multivariate distributions</li>
<li><code>lower-bound</code>, support lower bound</li>
<li><code>upper-bound</code>, support upper bound</li>
<li><code>distribution-id</code>, name of distribution</li>
<li><code>distribution-parameters</code>, list of parameters</li>
<li><code>integrate-pdf</code>, construct cdf and icdf out of pdf function</li>
</ul>
<p>Notes:</p>
<ul>
<li><code>distribution-parameters</code> by default returns only obligatory parameters, when last argument is <code>true</code>, returns also optional parameters, for example <code>:rng</code></li>
<li><code>drandom</code>, <code>frandom</code>, <code>lrandom</code> and <code>irandom</code> work only on univariate distributions</li>
<li><code>lrandom</code> and <code>irandom</code> use <code>round-even</code> to convert double to integer.</li>
<li><code>cdf</code>, <code>ccdf</code> and <code>icdf</code> are defined only for univariate distributions</li>
</ul>
<section id="examples" class="level4">
<h4 class="anchored" data-anchor-id="examples">Examples</h4>
<p>Let’s define Beta, Dirichlet and Bernoulli distributions as examples of univariate continuous, multivariate continuous and univariate discrete.</p>
<section id="log-logistic-univariate-continuous" class="level5">
<h5 class="anchored" data-anchor-id="log-logistic-univariate-continuous">Log-logistic, univariate continuous</h5>
<div class="sourceClojure">
<div class="sourceCode" id="cb32"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> log-logistic </span>(r/distribution <span class="at">:log-logistic</span> {<span class="at">:alpha</span> <span class="dv">3</span> <span class="at">:beta</span> <span class="dv">7</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb33"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a>(r/drandom log-logistic) <span class="co">;; =&gt; 15.569131250484759</span></span>
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a>(r/frandom log-logistic) <span class="co">;; =&gt; 14.62328</span></span>
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a>(r/lrandom log-logistic) <span class="co">;; =&gt; 9</span></span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a>(r/irandom log-logistic) <span class="co">;; =&gt; 5</span></span>
<span id="cb33-5"><a href="#cb33-5" aria-hidden="true" tabindex="-1"></a>(r/sample log-logistic) <span class="co">;; =&gt; 6.775617982226123</span></span>
<span id="cb33-6"><a href="#cb33-6" aria-hidden="true" tabindex="-1"></a>(r/distribution? log-logistic) <span class="co">;; =&gt; true</span></span>
<span id="cb33-7"><a href="#cb33-7" aria-hidden="true" tabindex="-1"></a>(r/distribution? <span class="fl">2.3</span>) <span class="co">;; =&gt; false</span></span>
<span id="cb33-8"><a href="#cb33-8" aria-hidden="true" tabindex="-1"></a>(r/pdf log-logistic <span class="dv">1</span>) <span class="co">;; =&gt; 0.008695578691184421</span></span>
<span id="cb33-9"><a href="#cb33-9" aria-hidden="true" tabindex="-1"></a>(r/lpdf log-logistic <span class="dv">1</span>) <span class="co">;; =&gt; -4.744940578912748</span></span>
<span id="cb33-10"><a href="#cb33-10" aria-hidden="true" tabindex="-1"></a>(r/observe1 log-logistic <span class="dv">1</span>) <span class="co">;; =&gt; -4.744940578912748</span></span>
<span id="cb33-11"><a href="#cb33-11" aria-hidden="true" tabindex="-1"></a>(r/cdf log-logistic <span class="dv">1</span>) <span class="co">;; =&gt; 0.0029069767441860456</span></span>
<span id="cb33-12"><a href="#cb33-12" aria-hidden="true" tabindex="-1"></a>(r/ccdf log-logistic <span class="dv">1</span>) <span class="co">;; =&gt; 0.997093023255814</span></span>
<span id="cb33-13"><a href="#cb33-13" aria-hidden="true" tabindex="-1"></a>(r/icdf log-logistic <span class="fl">0.002907</span>) <span class="co">;; =&gt; 1.0000026744341148</span></span>
<span id="cb33-14"><a href="#cb33-14" aria-hidden="true" tabindex="-1"></a>(r/dimensions log-logistic) <span class="co">;; =&gt; 1</span></span>
<span id="cb33-15"><a href="#cb33-15" aria-hidden="true" tabindex="-1"></a>(r/continuous? log-logistic) <span class="co">;; =&gt; true</span></span>
<span id="cb33-16"><a href="#cb33-16" aria-hidden="true" tabindex="-1"></a>(r/log-likelihood log-logistic (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; -24.684504975903153</span></span>
<span id="cb33-17"><a href="#cb33-17" aria-hidden="true" tabindex="-1"></a>(r/observe log-logistic (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; -24.684504975903153</span></span>
<span id="cb33-18"><a href="#cb33-18" aria-hidden="true" tabindex="-1"></a>(r/likelihood log-logistic (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; 1.9039507073388636E-11</span></span>
<span id="cb33-19"><a href="#cb33-19" aria-hidden="true" tabindex="-1"></a>(r/mean log-logistic) <span class="co">;; =&gt; 8.464397033093016</span></span>
<span id="cb33-20"><a href="#cb33-20" aria-hidden="true" tabindex="-1"></a>(r/variance log-logistic) <span class="co">;; =&gt; 46.85554132946835</span></span>
<span id="cb33-21"><a href="#cb33-21" aria-hidden="true" tabindex="-1"></a>(r/lower-bound log-logistic) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb33-22"><a href="#cb33-22" aria-hidden="true" tabindex="-1"></a>(r/upper-bound log-logistic) <span class="co">;; =&gt; ##Inf</span></span>
<span id="cb33-23"><a href="#cb33-23" aria-hidden="true" tabindex="-1"></a>(r/distribution-id log-logistic) <span class="co">;; =&gt; :log-logistic</span></span>
<span id="cb33-24"><a href="#cb33-24" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters log-logistic) <span class="co">;; =&gt; [{:alpha 3, :beta 7}]</span></span>
<span id="cb33-25"><a href="#cb33-25" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters log-logistic <span class="va">true</span>) <span class="co">;; =&gt; [:rng {:alpha 3, :beta 7}]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="dirichlet-multivariate-continuous" class="level5">
<h5 class="anchored" data-anchor-id="dirichlet-multivariate-continuous">Dirichlet, multivariate continuous</h5>
<div class="sourceClojure">
<div class="sourceCode" id="cb34"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> dirichlet </span>(r/distribution <span class="at">:dirichlet</span> {<span class="at">:alpha</span> [<span class="dv">1</span> <span class="dv">2</span> <span class="dv">3</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb35"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a>(r/sample dirichlet) <span class="co">;; =&gt; [0.003445452232110447 0.275234261853562 0.7213202859143276]</span></span>
<span id="cb35-2"><a href="#cb35-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">reduce</span> <span class="kw">+</span> (r/sample dirichlet)) <span class="co">;; =&gt; 1.0</span></span>
<span id="cb35-3"><a href="#cb35-3" aria-hidden="true" tabindex="-1"></a>(r/distribution? dirichlet) <span class="co">;; =&gt; true</span></span>
<span id="cb35-4"><a href="#cb35-4" aria-hidden="true" tabindex="-1"></a>(r/pdf dirichlet [<span class="fl">0.5</span> <span class="fl">0.1</span> <span class="fl">0.4</span>]) <span class="co">;; =&gt; 0.9600000000000001</span></span>
<span id="cb35-5"><a href="#cb35-5" aria-hidden="true" tabindex="-1"></a>(r/lpdf dirichlet [<span class="fl">0.5</span> <span class="fl">0.1</span> <span class="fl">0.4</span>]) <span class="co">;; =&gt; -0.040821994520255034</span></span>
<span id="cb35-6"><a href="#cb35-6" aria-hidden="true" tabindex="-1"></a>(r/observe1 dirichlet [<span class="fl">0.5</span> <span class="fl">0.1</span> <span class="fl">0.4</span>]) <span class="co">;; =&gt; -0.040821994520255034</span></span>
<span id="cb35-7"><a href="#cb35-7" aria-hidden="true" tabindex="-1"></a>(r/dimensions dirichlet) <span class="co">;; =&gt; 3</span></span>
<span id="cb35-8"><a href="#cb35-8" aria-hidden="true" tabindex="-1"></a>(r/continuous? dirichlet) <span class="co">;; =&gt; true</span></span>
<span id="cb35-9"><a href="#cb35-9" aria-hidden="true" tabindex="-1"></a>(r/log-likelihood dirichlet (<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/sample dirichlet)))) <span class="co">;; =&gt; 11.705240043173438</span></span>
<span id="cb35-10"><a href="#cb35-10" aria-hidden="true" tabindex="-1"></a>(r/observe dirichlet (<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/sample dirichlet)))) <span class="co">;; =&gt; 11.520175296855252</span></span>
<span id="cb35-11"><a href="#cb35-11" aria-hidden="true" tabindex="-1"></a>(r/likelihood dirichlet (<span class="kw">repeatedly</span> <span class="dv">10</span> (fn* [] (r/sample dirichlet)))) <span class="co">;; =&gt; 600028.77038651</span></span>
<span id="cb35-12"><a href="#cb35-12" aria-hidden="true" tabindex="-1"></a>(r/means dirichlet) <span class="co">;; =&gt; (0.16666666666666666 0.3333333333333333 0.5)</span></span>
<span id="cb35-13"><a href="#cb35-13" aria-hidden="true" tabindex="-1"></a>(r/covariance dirichlet) <span class="co">;; =&gt; [[0.019841269841269844 -0.007936507936507936 -0.011904761904761904] [-0.007936507936507936 0.03174603174603175 -0.023809523809523808] [-0.011904761904761904 -0.023809523809523808 0.03571428571428571]]</span></span>
<span id="cb35-14"><a href="#cb35-14" aria-hidden="true" tabindex="-1"></a>(r/distribution-id dirichlet) <span class="co">;; =&gt; :dirichlet</span></span>
<span id="cb35-15"><a href="#cb35-15" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters dirichlet) <span class="co">;; =&gt; [:alpha]</span></span>
<span id="cb35-16"><a href="#cb35-16" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters dirichlet <span class="va">true</span>) <span class="co">;; =&gt; [:alpha :rng]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<ul>
<li>multivariate distributions don’t implement some of the functions, like <code>drandom</code> or <code>cdf</code>, <code>icdf</code>, etc.</li>
</ul>
</section>
<section id="poisson-univariate-discrete" class="level5">
<h5 class="anchored" data-anchor-id="poisson-univariate-discrete">Poisson, univariate discrete</h5>
<div class="sourceClojure">
<div class="sourceCode" id="cb36"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> poisson </span>(r/distribution <span class="at">:poisson</span> {<span class="at">:p</span> <span class="dv">10</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb37"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a>(r/drandom poisson) <span class="co">;; =&gt; 8.0</span></span>
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a>(r/frandom poisson) <span class="co">;; =&gt; 9.0</span></span>
<span id="cb37-3"><a href="#cb37-3" aria-hidden="true" tabindex="-1"></a>(r/lrandom poisson) <span class="co">;; =&gt; 10</span></span>
<span id="cb37-4"><a href="#cb37-4" aria-hidden="true" tabindex="-1"></a>(r/irandom poisson) <span class="co">;; =&gt; 11</span></span>
<span id="cb37-5"><a href="#cb37-5" aria-hidden="true" tabindex="-1"></a>(r/sample poisson) <span class="co">;; =&gt; 6</span></span>
<span id="cb37-6"><a href="#cb37-6" aria-hidden="true" tabindex="-1"></a>(r/distribution? poisson) <span class="co">;; =&gt; true</span></span>
<span id="cb37-7"><a href="#cb37-7" aria-hidden="true" tabindex="-1"></a>(r/pdf poisson <span class="dv">5</span>) <span class="co">;; =&gt; 0.03783327480207072</span></span>
<span id="cb37-8"><a href="#cb37-8" aria-hidden="true" tabindex="-1"></a>(r/lpdf poisson <span class="dv">5</span>) <span class="co">;; =&gt; -3.274566277811817</span></span>
<span id="cb37-9"><a href="#cb37-9" aria-hidden="true" tabindex="-1"></a>(r/observe1 poisson <span class="dv">5</span>) <span class="co">;; =&gt; -3.274566277811817</span></span>
<span id="cb37-10"><a href="#cb37-10" aria-hidden="true" tabindex="-1"></a>(r/cdf poisson <span class="dv">5</span>) <span class="co">;; =&gt; 0.0670859628790319</span></span>
<span id="cb37-11"><a href="#cb37-11" aria-hidden="true" tabindex="-1"></a>(r/ccdf poisson <span class="dv">5</span>) <span class="co">;; =&gt; 0.9329140371209681</span></span>
<span id="cb37-12"><a href="#cb37-12" aria-hidden="true" tabindex="-1"></a>(r/icdf poisson <span class="fl">0.999</span>) <span class="co">;; =&gt; 21</span></span>
<span id="cb37-13"><a href="#cb37-13" aria-hidden="true" tabindex="-1"></a>(r/dimensions poisson) <span class="co">;; =&gt; 1</span></span>
<span id="cb37-14"><a href="#cb37-14" aria-hidden="true" tabindex="-1"></a>(r/continuous? poisson) <span class="co">;; =&gt; false</span></span>
<span id="cb37-15"><a href="#cb37-15" aria-hidden="true" tabindex="-1"></a>(r/log-likelihood poisson (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; -35.34496599408817</span></span>
<span id="cb37-16"><a href="#cb37-16" aria-hidden="true" tabindex="-1"></a>(r/observe poisson (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; -35.34496599408817</span></span>
<span id="cb37-17"><a href="#cb37-17" aria-hidden="true" tabindex="-1"></a>(r/likelihood poisson (<span class="kw">range</span> <span class="dv">1</span> <span class="dv">10</span>)) <span class="co">;; =&gt; 4.46556387351644E-16</span></span>
<span id="cb37-18"><a href="#cb37-18" aria-hidden="true" tabindex="-1"></a>(r/mean poisson) <span class="co">;; =&gt; 10.0</span></span>
<span id="cb37-19"><a href="#cb37-19" aria-hidden="true" tabindex="-1"></a>(r/variance poisson) <span class="co">;; =&gt; 10.0</span></span>
<span id="cb37-20"><a href="#cb37-20" aria-hidden="true" tabindex="-1"></a>(r/lower-bound poisson) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb37-21"><a href="#cb37-21" aria-hidden="true" tabindex="-1"></a>(r/upper-bound poisson) <span class="co">;; =&gt; 2.147483647E9</span></span>
<span id="cb37-22"><a href="#cb37-22" aria-hidden="true" tabindex="-1"></a>(r/distribution-id poisson) <span class="co">;; =&gt; :poisson</span></span>
<span id="cb37-23"><a href="#cb37-23" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters poisson) <span class="co">;; =&gt; [:p]</span></span>
<span id="cb37-24"><a href="#cb37-24" aria-hidden="true" tabindex="-1"></a>(r/distribution-parameters poisson <span class="va">true</span>) <span class="co">;; =&gt; [:rng :p :epsilon :max-iterations]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="pdf-integration" class="level4">
<h4 class="anchored" data-anchor-id="pdf-integration">PDF integration</h4>
<p><code>integrate-pdf</code> returns a pair of CDF and iCDF functions using Romberg integration and interpolation. Given interval is divided into <code>steps</code> number of subinterval. Each subinteval is integrated and added to cumulative sum. All points a later interpolated to build CDF and iCDF.</p>
<p>Parameters:</p>
<ul>
<li><code>pdf-func</code> - univariate function, double-&gt;double</li>
<li><code>mn</code> - lower bound for integration, value of pdf-func should be 0.0 at this point</li>
<li><code>mx</code> - upper bound for integration</li>
<li><code>steps</code> - how much subintervals to integrate (default 1000)</li>
<li><code>interpolator</code> - interpolation method between integrated points (default :linear)</li>
</ul>
<p>Let’s compare cdf and icdf to integrated pdf of beta distribution</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb38"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> beta </span>(r/distribution <span class="at">:beta</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb39"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> integrated </span>(r/integrate-pdf (<span class="kw">partial</span> r/pdf beta)</span>
<span id="cb39-2"><a href="#cb39-2" aria-hidden="true" tabindex="-1"></a>                                 {<span class="at">:mn</span> -<span class="fl">0.001</span> <span class="at">:mx</span> <span class="fl">1.001</span> <span class="at">:steps</span> <span class="dv">10000</span></span>
<span id="cb39-3"><a href="#cb39-3" aria-hidden="true" tabindex="-1"></a>                                  <span class="at">:interpolator</span> <span class="at">:spline</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb40"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> beta-cdf </span>(<span class="kw">first</span> integrated))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb41"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> beta-icdf </span>(<span class="kw">second</span> integrated))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb42"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a>(r/cdf beta <span class="fl">0.5</span>) <span class="co">;; =&gt; 0.890625</span></span>
<span id="cb42-2"><a href="#cb42-2" aria-hidden="true" tabindex="-1"></a>(beta-cdf <span class="fl">0.5</span>) <span class="co">;; =&gt; 0.890624992926758</span></span>
<span id="cb42-3"><a href="#cb42-3" aria-hidden="true" tabindex="-1"></a>(r/icdf beta <span class="fl">0.5</span>) <span class="co">;; =&gt; 0.26444998329511316</span></span>
<span id="cb42-4"><a href="#cb42-4" aria-hidden="true" tabindex="-1"></a>(beta-icdf <span class="fl">0.5</span>) <span class="co">;; =&gt; 0.26444998499009115</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="sampling-2" class="level3">
<h3 class="anchored" data-anchor-id="sampling-2">Sampling</h3>
<div class="sourceClojure">
<div class="sourceCode" id="cb43"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> weibull </span>(r/distribution <span class="at">:weibull</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb44"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a>(r/sample weibull) <span class="co">;; =&gt; 1.6077698284288813</span></span>
<span id="cb44-2"><a href="#cb44-2" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq weibull <span class="dv">3</span>) <span class="co">;; =&gt; (0.30353772759166786 0.9348549528997722 1.1235206063986871)</span></span>
<span id="cb44-3"><a href="#cb44-3" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq weibull <span class="dv">5</span> <span class="at">:antithetic</span>) <span class="co">;; =&gt; (0.8789298248121516 0.7871567720020644 0.3359031152662685 1.4959111180822753 0.5761405777290171)</span></span>
<span id="cb44-4"><a href="#cb44-4" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq weibull <span class="dv">5</span> <span class="at">:uniform</span>) <span class="co">;; =&gt; (0.27819628819981307 0.5105865483391676 0.6372189139644687 1.1425580683435526 1.7502730290537003)</span></span>
<span id="cb44-5"><a href="#cb44-5" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq weibull <span class="dv">5</span> <span class="at">:systematic</span>) <span class="co">;; =&gt; (0.42415794076771685 0.6734882729621214 0.911929539913042 1.2027888245275842 1.8282741464907257)</span></span>
<span id="cb44-6"><a href="#cb44-6" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq weibull <span class="dv">5</span> <span class="at">:stratified</span>) <span class="co">;; =&gt; (0.400168757730896 0.6539622749107047 0.891072131829612 1.1739728271224017 1.719290334861315)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="prng-and-seed" class="level3">
<h3 class="anchored" data-anchor-id="prng-and-seed">PRNG and seed</h3>
<p>All distributions accept <code>:rng</code> optional parameter which is used internally for random number generation. By default, creator constructs custom PRNG instance.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb45"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> cauchy-mersenne-2288 </span>(r/distribution <span class="at">:cauchy</span> {<span class="at">:rng</span> (r/rng <span class="at">:mersenne</span> <span class="dv">2288</span>)}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb46"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">vec</span> (r/-&gt;seq cauchy-mersenne<span class="dv">-2288</span> <span class="dv">3</span>)) <span class="co">;; =&gt; [-0.1079136480774541 -5.558982159984645 -3.127061922456471]</span></span>
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">vec</span> (r/-&gt;seq cauchy-mersenne<span class="dv">-2288</span> <span class="dv">3</span>)) <span class="co">;; =&gt; [8.13804818209913 1.6141542337020716 -0.6694661861436221]</span></span>
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a>(r/set-seed! cauchy-mersenne<span class="dv">-2288</span> <span class="dv">2288</span>) <span class="co">;; =&gt; #object[org.apache.commons.math3.distribution.CauchyDistribution 0x12aa7ec9 "org.apache.commons.math3.distribution.CauchyDistribution@12aa7ec9"]</span></span>
<span id="cb46-4"><a href="#cb46-4" aria-hidden="true" tabindex="-1"></a>(<span class="kw">vec</span> (r/-&gt;seq cauchy-mersenne<span class="dv">-2288</span> <span class="dv">3</span>)) <span class="co">;; =&gt; [-0.1079136480774541 -5.558982159984645 -3.127061922456471]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="default-normal" class="level3">
<h3 class="anchored" data-anchor-id="default-normal">Default Normal</h3>
<p><code>default-normal</code> is a public var which is a normal distribution N(0,1), thread-safe.</p>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb47"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a>(r/-&gt;seq r/default-normal <span class="dv">3</span>) <span class="co">;; =&gt; (0.08356815451083356 -1.4099400584042356 -1.5590464558923103)</span></span>
<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a>(r/pdf r/default-normal <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.3989422804014327</span></span>
<span id="cb47-3"><a href="#cb47-3" aria-hidden="true" tabindex="-1"></a>(r/cdf r/default-normal <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.5</span></span>
<span id="cb47-4"><a href="#cb47-4" aria-hidden="true" tabindex="-1"></a>(r/icdf r/default-normal <span class="fl">0.5</span>) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb47-5"><a href="#cb47-5" aria-hidden="true" tabindex="-1"></a>(r/mean r/default-normal) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb47-6"><a href="#cb47-6" aria-hidden="true" tabindex="-1"></a>(r/variance r/default-normal) <span class="co">;; =&gt; 1.0</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="univariate-cont." class="level3">
<h3 class="anchored" data-anchor-id="univariate-cont.">Univariate, cont.</h3>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:anderson-darling</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:beta</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :alpha :beta :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:cauchy</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :median :scale :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:chi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:nu 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:chi-squared</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :degrees-of-freedom :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:chi-squared-noncentral</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:nu 1.0, :lambda 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:cramer-von-mises</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:erlang</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:k 1, :lambda 1}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:exgaus</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :nu :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:exponential</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mean :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:f</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng
 :numerator-degrees-of-freedom
 :denominator-degrees-of-freedom
 :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:fatigue-life</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:mu 0.0, :beta 1.0, :gamma 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:folded-normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:mu 0.0, :sigma 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:frechet</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:alpha 1.0, :beta 1.0, :delta 0.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:gamma</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :shape :scale :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:gumbel</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :beta]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:half-cauchy</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:scale :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:half-normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:sigma :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hyperbolic-secant</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:mu 0.0, :sigma 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hypoexponential</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :lambdas]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hypoexponential-equal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 1.0, :k 1.0, :h 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:inverse-gamma</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:alpha 2.0, :beta 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:inverse-gaussian</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:mu 1.0, :lambda 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:johnson-sb</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:gamma 0.0, :delta 1.0, :xi 0.0, :lambda 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:johnson-sl</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:gamma 0.0, :delta 1.0, :xi 0.0, :lambda 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:johnson-su</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:gamma 0.0, :delta 1.0, :xi 0.0, :lambda 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:kolmogorov</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:kolmogorov-smirnov</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:kolmogorov-smirnov+</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:laplace</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :beta]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:levy</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :c]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:log-logistic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:alpha 3.0, :beta 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:log-normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :scale :shape :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:logistic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :s]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:nakagami</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :omega :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :mu :sd :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:normal-inverse-gaussian</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:alpha 1.0, :beta 0.0, :mu 0.0, :delta 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:pareto</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :scale :shape :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:pearson-6</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:alpha1 1.0, :alpha2 1.0, :beta 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:power</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:a 0.0, :b 1.0, :c 2.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:rayleigh</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:a 0.0, :beta 1.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:reciprocal-sqrt</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:a :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:t</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :degrees-of-freedom :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:triangular</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :a :c :b]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:uniform-real</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :lower :upper]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:watson-g</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 2.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:watson-u</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng {:n 2.0}]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:weibull</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :alpha :beta :inverse-cumm-accuracy]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zaga</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :nu :lower-tail? :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<section id="anderson-darling" class="level4">
<h4 class="anchored" data-anchor-id="anderson-darling">Anderson-Darling</h4>
<p>Distribution of Anderson-Darling statistic <span class="math inline">\(A^2\)</span> on <span class="math inline">\(n\)</span> independent uniforms <span class="math inline">\(U[0,1]\)</span>.</p>
<ul>
<li>Name: <code>:anderson-darling</code></li>
<li>Default parameters:
<ul>
<li><code>:n</code>: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1AndersonDarlingDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/0.png" class="clay-image img-fluid"></td>
<td><img src="random_files/1.png" class="clay-image img-fluid"></td>
<td><img src="random_files/2.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/3.png" class="clay-image img-fluid"></td>
<td><img src="random_files/4.png" class="clay-image img-fluid"></td>
<td><img src="random_files/5.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="beta" class="level4">
<h4 class="anchored" data-anchor-id="beta">Beta</h4>
<ul>
<li>Name: <code>:beta</code></li>
<li>Default parameters:
<ul>
<li><code>:alpha</code>: <span class="math inline">\(2.0\)</span></li>
<li><code>:beta</code>: <span class="math inline">\(5.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Beta_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/BetaDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 1, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/6.png" class="clay-image img-fluid"></td>
<td><img src="random_files/7.png" class="clay-image img-fluid"></td>
<td><img src="random_files/8.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 0.5, :beta 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/9.png" class="clay-image img-fluid"></td>
<td><img src="random_files/10.png" class="clay-image img-fluid"></td>
<td><img src="random_files/11.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 3, :beta 3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/12.png" class="clay-image img-fluid"></td>
<td><img src="random_files/13.png" class="clay-image img-fluid"></td>
<td><img src="random_files/14.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 5, :beta 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/15.png" class="clay-image img-fluid"></td>
<td><img src="random_files/16.png" class="clay-image img-fluid"></td>
<td><img src="random_files/17.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="cauchy" class="level4">
<h4 class="anchored" data-anchor-id="cauchy">Cauchy</h4>
<ul>
<li>Name <code>:cauchy</code></li>
<li>Default parameters:
<ul>
<li><code>:median</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:scale</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Cauchy_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/CauchyDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:median 0, :scale 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/18.png" class="clay-image img-fluid"></td>
<td><img src="random_files/19.png" class="clay-image img-fluid"></td>
<td><img src="random_files/20.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:median 1, :scale 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/21.png" class="clay-image img-fluid"></td>
<td><img src="random_files/22.png" class="clay-image img-fluid"></td>
<td><img src="random_files/23.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="chi" class="level4">
<h4 class="anchored" data-anchor-id="chi">Chi</h4>
<ul>
<li>Name: <code>:chi</code></li>
<li>Default parameters:
<ul>
<li><code>:nu</code>, degrees of freedom: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Chi_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1ChiDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/24.png" class="clay-image img-fluid"></td>
<td><img src="random_files/25.png" class="clay-image img-fluid"></td>
<td><img src="random_files/26.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/27.png" class="clay-image img-fluid"></td>
<td><img src="random_files/28.png" class="clay-image img-fluid"></td>
<td><img src="random_files/29.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="chi-squared" class="level4">
<h4 class="anchored" data-anchor-id="chi-squared">Chi-squared</h4>
<ul>
<li>Name: <code>:chi-squered</code></li>
<li>Default parameters:
<ul>
<li><code>:degrees-of-freedom</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Chi-squared_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/ChiSquaredDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:degrees-of-freedom 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/30.png" class="clay-image img-fluid"></td>
<td><img src="random_files/31.png" class="clay-image img-fluid"></td>
<td><img src="random_files/32.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:degrees-of-freedom 3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/33.png" class="clay-image img-fluid"></td>
<td><img src="random_files/34.png" class="clay-image img-fluid"></td>
<td><img src="random_files/35.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="chi-squared-noncentral" class="level4">
<h4 class="anchored" data-anchor-id="chi-squared-noncentral">Chi-squared noncentral</h4>
<ul>
<li>Name: <code>:chi-squared-noncentral</code></li>
<li>Default parameters:
<ul>
<li><code>:nu</code>, degrees-of-freedom: <span class="math inline">\(1.0\)</span></li>
<li><code>:lambda</code>, noncentrality: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1ChiSquareNoncentralDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 1, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/36.png" class="clay-image img-fluid"></td>
<td><img src="random_files/37.png" class="clay-image img-fluid"></td>
<td><img src="random_files/38.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 3, :lambda 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/39.png" class="clay-image img-fluid"></td>
<td><img src="random_files/40.png" class="clay-image img-fluid"></td>
<td><img src="random_files/41.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="cramer-von-mises" class="level4">
<h4 class="anchored" data-anchor-id="cramer-von-mises">Cramer-von Mises</h4>
<p>Distribution of Cramer-von Mises statistic <span class="math inline">\(W^2\)</span> on <span class="math inline">\(n\)</span> independent uniforms <span class="math inline">\(U[0,1]\)</span>.</p>
<ul>
<li>Name: <code>:cramer-von-mises</code></li>
<li>Default parameters
<ul>
<li><code>:n</code>: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1CramerVonMisesDist.html">source</a></li>
</ul>
<p>Note: PDF is calculated using finite difference method from CDF.</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/42.png" class="clay-image img-fluid"></td>
<td><img src="random_files/43.png" class="clay-image img-fluid"></td>
<td><img src="random_files/44.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/45.png" class="clay-image img-fluid"></td>
<td><img src="random_files/46.png" class="clay-image img-fluid"></td>
<td><img src="random_files/47.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="erlang" class="level4">
<h4 class="anchored" data-anchor-id="erlang">Erlang</h4>
<ul>
<li>Name: <code>:erlang</code></li>
<li>Default parameters
<ul>
<li><code>:k</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:lambda</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Erlang_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1ErlangDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:k 1, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/48.png" class="clay-image img-fluid"></td>
<td><img src="random_files/49.png" class="clay-image img-fluid"></td>
<td><img src="random_files/50.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:k 7, :lambda 2.0}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/51.png" class="clay-image img-fluid"></td>
<td><img src="random_files/52.png" class="clay-image img-fluid"></td>
<td><img src="random_files/53.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="ex-gaussian" class="level4">
<h4 class="anchored" data-anchor-id="ex-gaussian">ex-Gaussian</h4>
<ul>
<li>Name: <code>:exgaus</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(5.0\)</span></li>
<li><code>:sigma</code>, standard deviation: <span class="math inline">\(1.0\)</span></li>
<li><code>:nu</code>, mean of exponential variable: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Exponentially_modified_Gaussian_distribution">wiki</a>, <a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/exGAUS.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :sigma 1, :nu 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/54.png" class="clay-image img-fluid"></td>
<td><img src="random_files/55.png" class="clay-image img-fluid"></td>
<td><img src="random_files/56.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu -2, :sigma 0.5, :nu 4}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/57.png" class="clay-image img-fluid"></td>
<td><img src="random_files/58.png" class="clay-image img-fluid"></td>
<td><img src="random_files/59.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="exponential" class="level4">
<h4 class="anchored" data-anchor-id="exponential">Exponential</h4>
<ul>
<li>Name: <code>:exponential</code></li>
<li>Default parameters
<ul>
<li><code>:mean</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Exponential_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/ExponentialDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mean 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/60.png" class="clay-image img-fluid"></td>
<td><img src="random_files/61.png" class="clay-image img-fluid"></td>
<td><img src="random_files/62.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mean 3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/63.png" class="clay-image img-fluid"></td>
<td><img src="random_files/64.png" class="clay-image img-fluid"></td>
<td><img src="random_files/65.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="f" class="level4">
<h4 class="anchored" data-anchor-id="f">F</h4>
<ul>
<li>Name: <code>:f</code></li>
<li>Default parameters
<ul>
<li><code>:numerator-degrees-of-freedom</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:denominator-degrees-of-freedom</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/F-distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/FDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:numerator-degrees-of-freedom 1, :denominator-degrees-of-freedom 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/66.png" class="clay-image img-fluid"></td>
<td><img src="random_files/67.png" class="clay-image img-fluid"></td>
<td><img src="random_files/68.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:numerator-degrees-of-freedom 10, :denominator-degrees-of-freedom 15}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/69.png" class="clay-image img-fluid"></td>
<td><img src="random_files/70.png" class="clay-image img-fluid"></td>
<td><img src="random_files/71.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="fatigue-life" class="level4">
<h4 class="anchored" data-anchor-id="fatigue-life">Fatigue life</h4>
<ul>
<li>Name: <code>:fatigue-life</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
<li><code>:gamma</code>, shape: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Birnbaum%E2%80%93Saunders_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1FatigueLifeDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :beta 1, :gamma 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/72.png" class="clay-image img-fluid"></td>
<td><img src="random_files/73.png" class="clay-image img-fluid"></td>
<td><img src="random_files/74.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu -1, :beta 3, :gamma 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/75.png" class="clay-image img-fluid"></td>
<td><img src="random_files/76.png" class="clay-image img-fluid"></td>
<td><img src="random_files/77.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="folded-normal" class="level4">
<h4 class="anchored" data-anchor-id="folded-normal">Folded Normal</h4>
<ul>
<li>Name: <code>:folded-normal</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>: <span class="math inline">\(0.0\)</span></li>
<li><code>:sigma</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Folded_normal_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1FoldedNormalDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :sigma 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/78.png" class="clay-image img-fluid"></td>
<td><img src="random_files/79.png" class="clay-image img-fluid"></td>
<td><img src="random_files/80.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 2, :sigma 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/81.png" class="clay-image img-fluid"></td>
<td><img src="random_files/82.png" class="clay-image img-fluid"></td>
<td><img src="random_files/83.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="frechet" class="level4">
<h4 class="anchored" data-anchor-id="frechet">Frechet</h4>
<ul>
<li>Name: <code>:frechet</code></li>
<li>Default parameters
<ul>
<li><code>:delta</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:alpha</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Fr%C3%A9chet_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1FrechetDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:delta 0, :alpha 1, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/84.png" class="clay-image img-fluid"></td>
<td><img src="random_files/85.png" class="clay-image img-fluid"></td>
<td><img src="random_files/86.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:delta 1, :alpha 3, :beta 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/87.png" class="clay-image img-fluid"></td>
<td><img src="random_files/88.png" class="clay-image img-fluid"></td>
<td><img src="random_files/89.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="gamma" class="level4">
<h4 class="anchored" data-anchor-id="gamma">Gamma</h4>
<ul>
<li>Name: <code>:gamma</code></li>
<li>Default parameters
<ul>
<li><code>:shape</code>: <span class="math inline">\(2.0\)</span></li>
<li><code>:scale</code>: <span class="math inline">\(2.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Gamma_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/GammaDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:shape 2, :scale 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/90.png" class="clay-image img-fluid"></td>
<td><img src="random_files/91.png" class="clay-image img-fluid"></td>
<td><img src="random_files/92.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:shape 5, :scale 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/93.png" class="clay-image img-fluid"></td>
<td><img src="random_files/94.png" class="clay-image img-fluid"></td>
<td><img src="random_files/95.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="gumbel" class="level4">
<h4 class="anchored" data-anchor-id="gumbel">Gumbel</h4>
<ul>
<li>Name: <code>:gumbel</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, location: <span class="math inline">\(1.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(2.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Gumbel_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/GumbelDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :beta 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/96.png" class="clay-image img-fluid"></td>
<td><img src="random_files/97.png" class="clay-image img-fluid"></td>
<td><img src="random_files/98.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :beta 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/99.png" class="clay-image img-fluid"></td>
<td><img src="random_files/100.png" class="clay-image img-fluid"></td>
<td><img src="random_files/101.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="half-cauchy" class="level4">
<h4 class="anchored" data-anchor-id="half-cauchy">Half Cauchy</h4>
<ul>
<li>Name: <code>:half-cauchy</code></li>
<li>Default parameters
<ul>
<li><code>:scale</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://distribution-explorer.github.io/continuous/halfcauchy.html">info</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/102.png" class="clay-image img-fluid"></td>
<td><img src="random_files/103.png" class="clay-image img-fluid"></td>
<td><img src="random_files/104.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/105.png" class="clay-image img-fluid"></td>
<td><img src="random_files/106.png" class="clay-image img-fluid"></td>
<td><img src="random_files/107.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="half-normal" class="level4">
<h4 class="anchored" data-anchor-id="half-normal">Half Normal</h4>
<ul>
<li>Name: <code>:half-normal</code></li>
<li>Default parameters
<ul>
<li><code>:sigma</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Half-normal_distribution">wiki</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:sigma 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/108.png" class="clay-image img-fluid"></td>
<td><img src="random_files/109.png" class="clay-image img-fluid"></td>
<td><img src="random_files/110.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:sigma 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/111.png" class="clay-image img-fluid"></td>
<td><img src="random_files/112.png" class="clay-image img-fluid"></td>
<td><img src="random_files/113.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="hyperbolic-secant" class="level4">
<h4 class="anchored" data-anchor-id="hyperbolic-secant">Hyperbolic secant</h4>
<ul>
<li>Name: <code>:hyperbolic-secant</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>: <span class="math inline">\(0.0\)</span></li>
<li><code>:sigma</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Hyperbolic_secant_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1HyperbolicSecantDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :sigma 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/114.png" class="clay-image img-fluid"></td>
<td><img src="random_files/115.png" class="clay-image img-fluid"></td>
<td><img src="random_files/116.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :sigma 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/117.png" class="clay-image img-fluid"></td>
<td><img src="random_files/118.png" class="clay-image img-fluid"></td>
<td><img src="random_files/119.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="hypoexponential" class="level4">
<h4 class="anchored" data-anchor-id="hypoexponential">Hypoexponential</h4>
<ul>
<li>Name: <code>:hypoexponential</code></li>
<li>Default parameters
<ul>
<li><code>:lambdas</code>, list of rates: <code>[1.0]</code></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Hypoexponential_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1HypoExponentialDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lambdas [1]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/120.png" class="clay-image img-fluid"></td>
<td><img src="random_files/121.png" class="clay-image img-fluid"></td>
<td><img src="random_files/122.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lambdas [1 2 3 4 1]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/123.png" class="clay-image img-fluid"></td>
<td><img src="random_files/124.png" class="clay-image img-fluid"></td>
<td><img src="random_files/125.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="hypoexponential-equal" class="level4">
<h4 class="anchored" data-anchor-id="hypoexponential-equal">Hypoexponential equal</h4>
<p>Hypoexponential distribution, where <span class="math inline">\(\lambda_i=(n+1-i)h,\text{ for } i=1\dots k\)</span></p>
<ul>
<li>Name: <code>:hypoexponential-equal</code></li>
<li>Default parameters
<ul>
<li><code>:k</code>, number of rates: <span class="math inline">\(1\)</span></li>
<li><code>:h</code>, difference between rates: <span class="math inline">\(1\)</span></li>
<li><code>:n</code> <span class="math inline">\(=\frac{\lambda_1}{h}\)</span>: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1HypoExponentialDistEqual.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 1, :k 1, :h 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/126.png" class="clay-image img-fluid"></td>
<td><img src="random_files/127.png" class="clay-image img-fluid"></td>
<td><img src="random_files/128.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 5, :h 0.5, :k 6}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/129.png" class="clay-image img-fluid"></td>
<td><img src="random_files/130.png" class="clay-image img-fluid"></td>
<td><img src="random_files/131.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="inverse-gamma" class="level4">
<h4 class="anchored" data-anchor-id="inverse-gamma">Inverse Gamma</h4>
<ul>
<li>Name: <code>:inverse-gamma</code></li>
<li>Default parameters
<ul>
<li><code>:alpha</code>, shape: <span class="math inline">\(2.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span> *<a href="https://en.wikipedia.org/wiki/Inverse-gamma_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1InverseGammaDist.html">source</a></li>
</ul></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 2, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/132.png" class="clay-image img-fluid"></td>
<td><img src="random_files/133.png" class="clay-image img-fluid"></td>
<td><img src="random_files/134.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 1.5, :beta 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/135.png" class="clay-image img-fluid"></td>
<td><img src="random_files/136.png" class="clay-image img-fluid"></td>
<td><img src="random_files/137.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="inverse-gaussian" class="level4">
<h4 class="anchored" data-anchor-id="inverse-gaussian">Inverse Gaussian</h4>
<ul>
<li>Name: <code>:inverse-gaussian</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, location: <span class="math inline">\(1.0\)</span></li>
<li><code>:lambda</code>, scale: <span class="math inline">\(1.0\)</span> *<a href="https://en.wikipedia.org/wiki/Inverse_Gaussian_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1InverseGaussianDist.html">source</a></li>
</ul></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/138.png" class="clay-image img-fluid"></td>
<td><img src="random_files/139.png" class="clay-image img-fluid"></td>
<td><img src="random_files/140.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 2, :lambda 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/141.png" class="clay-image img-fluid"></td>
<td><img src="random_files/142.png" class="clay-image img-fluid"></td>
<td><img src="random_files/143.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="johnson-sb" class="level4">
<h4 class="anchored" data-anchor-id="johnson-sb">Johnson Sb</h4>
<ul>
<li>Name: <code>:johnson-sb</code></li>
<li>Default parameters
<ul>
<li><code>:gamma</code>, shape: <span class="math inline">\(0.0\)</span></li>
<li><code>:delta</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:xi</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:lambda</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Johnson%27s_SU-distribution#Johnson's_SB-distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1JohnsonSBDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0, :delta 1, :xi 0, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/144.png" class="clay-image img-fluid"></td>
<td><img src="random_files/145.png" class="clay-image img-fluid"></td>
<td><img src="random_files/146.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0.5, :delta 2, :xi 0, :lambda 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/147.png" class="clay-image img-fluid"></td>
<td><img src="random_files/148.png" class="clay-image img-fluid"></td>
<td><img src="random_files/149.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="johnson-sl" class="level4">
<h4 class="anchored" data-anchor-id="johnson-sl">Johnson Sl</h4>
<ul>
<li>Name: <code>:johnson-sl</code></li>
<li>Default parameters
<ul>
<li><code>:gamma</code>, shape: <span class="math inline">\(0.0\)</span></li>
<li><code>:delta</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:xi</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:lambda</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1JohnsonSLDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0, :delta 1, :xi 0, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/150.png" class="clay-image img-fluid"></td>
<td><img src="random_files/151.png" class="clay-image img-fluid"></td>
<td><img src="random_files/152.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0.5, :delta 2, :xi 0, :lambda 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/153.png" class="clay-image img-fluid"></td>
<td><img src="random_files/154.png" class="clay-image img-fluid"></td>
<td><img src="random_files/155.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="johnson-su" class="level4">
<h4 class="anchored" data-anchor-id="johnson-su">Johnson Su</h4>
<ul>
<li>Name: <code>:johnson-su</code></li>
<li>Default parameters
<ul>
<li><code>:gamma</code>, shape: <span class="math inline">\(0.0\)</span></li>
<li><code>:delta</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:xi</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:lambda</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Johnson%27s_SU-distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1JohnsonSUDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0, :delta 1, :xi 0, :lambda 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/156.png" class="clay-image img-fluid"></td>
<td><img src="random_files/157.png" class="clay-image img-fluid"></td>
<td><img src="random_files/158.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:gamma 0.5, :delta 2, :xi 0, :lambda 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/159.png" class="clay-image img-fluid"></td>
<td><img src="random_files/160.png" class="clay-image img-fluid"></td>
<td><img src="random_files/161.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="kolmogorov" class="level4">
<h4 class="anchored" data-anchor-id="kolmogorov">Kolmogorov</h4>
<ul>
<li>Name: <code>:kolmogorov</code></li>
<li><a href="https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test#Kolmogorov_distribution">wiki</a>, <a href="https://www.math.ucla.edu/~tom/distributions/Kolmogorov.html">info</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/162.png" class="clay-image img-fluid"></td>
<td><img src="random_files/163.png" class="clay-image img-fluid"></td>
<td><img src="random_files/164.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="kolmogorov-smirnov" class="level4">
<h4 class="anchored" data-anchor-id="kolmogorov-smirnov">Kolmogorov-Smirnov</h4>
<ul>
<li>Name: <code>:kolmogorov-smirnov</code></li>
<li>Default parameters
<ul>
<li><code>:n</code>, sample size: 1</li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1KolmogorovSmirnovDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/165.png" class="clay-image img-fluid"></td>
<td><img src="random_files/166.png" class="clay-image img-fluid"></td>
<td><img src="random_files/167.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/168.png" class="clay-image img-fluid"></td>
<td><img src="random_files/169.png" class="clay-image img-fluid"></td>
<td><img src="random_files/170.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="kolmogorov-smirnov-1" class="level4">
<h4 class="anchored" data-anchor-id="kolmogorov-smirnov-1">Kolmogorov-Smirnov+</h4>
<ul>
<li>Name: <code>:kolmogorov-smirnov+</code></li>
<li>Default parameters
<ul>
<li><code>:n</code>, sample size: 1</li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1KolmogorovSmirnovPlusDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/171.png" class="clay-image img-fluid"></td>
<td><img src="random_files/172.png" class="clay-image img-fluid"></td>
<td><img src="random_files/173.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/174.png" class="clay-image img-fluid"></td>
<td><img src="random_files/175.png" class="clay-image img-fluid"></td>
<td><img src="random_files/176.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="laplace" class="level4">
<h4 class="anchored" data-anchor-id="laplace">Laplace</h4>
<ul>
<li>Name: <code>:laplace</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>: <span class="math inline">\(0.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Laplace_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/LaplaceDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/177.png" class="clay-image img-fluid"></td>
<td><img src="random_files/178.png" class="clay-image img-fluid"></td>
<td><img src="random_files/179.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :beta 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/180.png" class="clay-image img-fluid"></td>
<td><img src="random_files/181.png" class="clay-image img-fluid"></td>
<td><img src="random_files/182.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="levy" class="level4">
<h4 class="anchored" data-anchor-id="levy">Levy</h4>
<ul>
<li>Name: <code>:levy</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>: <span class="math inline">\(0.0\)</span></li>
<li><code>:c</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/L%C3%A9vy_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/LevyDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :c 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/183.png" class="clay-image img-fluid"></td>
<td><img src="random_files/184.png" class="clay-image img-fluid"></td>
<td><img src="random_files/185.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :c 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/186.png" class="clay-image img-fluid"></td>
<td><img src="random_files/187.png" class="clay-image img-fluid"></td>
<td><img src="random_files/188.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="log-logistic" class="level4">
<h4 class="anchored" data-anchor-id="log-logistic">Log Logistic</h4>
<ul>
<li>Name: <code>:log-logistic</code></li>
<li>Default parameters
<ul>
<li><code>:alpha</code>, shape: <span class="math inline">\(3.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Log-logistic_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1LoglogisticDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 3, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/189.png" class="clay-image img-fluid"></td>
<td><img src="random_files/190.png" class="clay-image img-fluid"></td>
<td><img src="random_files/191.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 5, :beta 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/192.png" class="clay-image img-fluid"></td>
<td><img src="random_files/193.png" class="clay-image img-fluid"></td>
<td><img src="random_files/194.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="log-normal" class="level4">
<h4 class="anchored" data-anchor-id="log-normal">Log Normal</h4>
<ul>
<li>Name: <code>:log-normal</code></li>
<li>Default parameters
<ul>
<li><code>:scale</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:shape</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Log-normal_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/LogNormalDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 1, :shape 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/195.png" class="clay-image img-fluid"></td>
<td><img src="random_files/196.png" class="clay-image img-fluid"></td>
<td><img src="random_files/197.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 2, :shape 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/198.png" class="clay-image img-fluid"></td>
<td><img src="random_files/199.png" class="clay-image img-fluid"></td>
<td><img src="random_files/200.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="logistic" class="level4">
<h4 class="anchored" data-anchor-id="logistic">Logistic</h4>
<ul>
<li>Name: <code>:logistic</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:s</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Logistic_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/LogisticDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :scale 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/201.png" class="clay-image img-fluid"></td>
<td><img src="random_files/202.png" class="clay-image img-fluid"></td>
<td><img src="random_files/203.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :scale 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/204.png" class="clay-image img-fluid"></td>
<td><img src="random_files/205.png" class="clay-image img-fluid"></td>
<td><img src="random_files/206.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="nakagami" class="level4">
<h4 class="anchored" data-anchor-id="nakagami">Nakagami</h4>
<ul>
<li>Name: <code>:nakagami</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, shape: <span class="math inline">\(1.0\)</span></li>
<li><code>:omega</code>, spread: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Nakagami_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/NakagamiDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :omega 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/207.png" class="clay-image img-fluid"></td>
<td><img src="random_files/208.png" class="clay-image img-fluid"></td>
<td><img src="random_files/209.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :omega 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/210.png" class="clay-image img-fluid"></td>
<td><img src="random_files/211.png" class="clay-image img-fluid"></td>
<td><img src="random_files/212.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="normal" class="level4">
<h4 class="anchored" data-anchor-id="normal">Normal</h4>
<ul>
<li>Name: <code>:normal</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(0.0\)</span></li>
<li><code>:sd</code>, standard deviation: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Normal_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/NormalDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :sd 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/213.png" class="clay-image img-fluid"></td>
<td><img src="random_files/214.png" class="clay-image img-fluid"></td>
<td><img src="random_files/215.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sd 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/216.png" class="clay-image img-fluid"></td>
<td><img src="random_files/217.png" class="clay-image img-fluid"></td>
<td><img src="random_files/218.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="normal-inverse-gaussian" class="level4">
<h4 class="anchored" data-anchor-id="normal-inverse-gaussian">Normal-Inverse Gaussian</h4>
<ul>
<li>Name: <code>:normal-inverse-gaussian</code></li>
<li>Default parameters
<ul>
<li><code>:alpha</code>, tail heavyness: <span class="math inline">\(1.0\)</span></li>
<li><code>:beta</code>, asymmetry: <span class="math inline">\(0.0\)</span></li>
<li><code>:mu</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:delta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Normal-inverse_Gaussian_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1NormalInverseGaussianDist.html">source</a></li>
</ul>
<p>Only PDF is supported, you may call <code>integrate-pdf</code> to get CDF and iCDF pair.</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha 1, :beta 0, :mu 0, :delta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha 2, :beta 1, :mu 0, :delta 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/219.png" class="clay-image img-fluid"></td>
<td><img src="random_files/220.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb220"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">let</span> [[cdf icdf] (r/integrate-pdf</span>
<span id="cb220-2"><a href="#cb220-2" aria-hidden="true" tabindex="-1"></a>                  (<span class="kw">partial</span> r/pdf (r/distribution <span class="at">:normal-inverse-gaussian</span>))</span>
<span id="cb220-3"><a href="#cb220-3" aria-hidden="true" tabindex="-1"></a>                  {<span class="at">:mn</span> -<span class="fl">800.0</span> <span class="at">:mx</span> <span class="fl">800.0</span> <span class="at">:steps</span> <span class="dv">5000</span></span>
<span id="cb220-4"><a href="#cb220-4" aria-hidden="true" tabindex="-1"></a>                   <span class="at">:interpolator</span> <span class="at">:monotone</span>})]</span>
<span id="cb220-5"><a href="#cb220-5" aria-hidden="true" tabindex="-1"></a>  [(cdf <span class="fl">0.0</span>) (icdf <span class="fl">0.5</span>)])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb221"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true" tabindex="-1"></a>[<span class="fl">0.5000000000001334</span> -<span class="fl">2.5040386431030015E-13</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td>CDF</td>
<td>iCDF</td>
</tr>
<tr class="even">
<td><img src="random_files/221.png" class="clay-image img-fluid"></td>
<td><img src="random_files/222.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="pareto" class="level4">
<h4 class="anchored" data-anchor-id="pareto">Pareto</h4>
<ul>
<li>Name: <code>:pareto</code></li>
<li>Default parameters
<ul>
<li><code>:shape</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:scale</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Pareto_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/ParetoDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 1, :shape 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/223.png" class="clay-image img-fluid"></td>
<td><img src="random_files/224.png" class="clay-image img-fluid"></td>
<td><img src="random_files/225.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 2, :shape 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/226.png" class="clay-image img-fluid"></td>
<td><img src="random_files/227.png" class="clay-image img-fluid"></td>
<td><img src="random_files/228.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="pearson-vi" class="level4">
<h4 class="anchored" data-anchor-id="pearson-vi">Pearson VI</h4>
<ul>
<li>Name: <code>:pearson-6</code></li>
<li>Default parameters:
<ul>
<li><code>:alpha1</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:alpha2</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:beta</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Pearson_distribution#The_Pearson_type_VI_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1Pearson6Dist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha1 1, :alpha2 1, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/229.png" class="clay-image img-fluid"></td>
<td><img src="random_files/230.png" class="clay-image img-fluid"></td>
<td><img src="random_files/231.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:scale 2, :shape 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/232.png" class="clay-image img-fluid"></td>
<td><img src="random_files/233.png" class="clay-image img-fluid"></td>
<td><img src="random_files/234.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="power" class="level4">
<h4 class="anchored" data-anchor-id="power">Power</h4>
<ul>
<li>Name: <code>:power</code></li>
<li>Default parameters
<ul>
<li><code>:a</code>: <span class="math inline">\(0.0\)</span></li>
<li><code>:b</code>: <span class="math inline">\(1.0\)</span></li>
<li><code>:c</code>: <span class="math inline">\(2.0\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1PowerDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 0, :b 1, :c 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/235.png" class="clay-image img-fluid"></td>
<td><img src="random_files/236.png" class="clay-image img-fluid"></td>
<td><img src="random_files/237.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 1, :b 2, :c 1.25}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/238.png" class="clay-image img-fluid"></td>
<td><img src="random_files/239.png" class="clay-image img-fluid"></td>
<td><img src="random_files/240.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="rayleigh" class="level4">
<h4 class="anchored" data-anchor-id="rayleigh">Rayleigh</h4>
<ul>
<li>Name: <code>:rayleigh</code></li>
<li>Default parameters
<ul>
<li><code>:a</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Rayleigh_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1RayleighDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 0, :b 1, :c 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/241.png" class="clay-image img-fluid"></td>
<td><img src="random_files/242.png" class="clay-image img-fluid"></td>
<td><img src="random_files/243.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 1, :b 2, :c 1.25}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/244.png" class="clay-image img-fluid"></td>
<td><img src="random_files/245.png" class="clay-image img-fluid"></td>
<td><img src="random_files/246.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="reciprocal-sqrt" class="level4">
<h4 class="anchored" data-anchor-id="reciprocal-sqrt">Reciprocal Sqrt</h4>
<p><span class="math inline">\(\operatorname{PDF}(x)=\frac{1}{\sqrt{x}}, x\in(a,(\frac{1}{2}(1+2\sqrt{a}))^2)\)</span></p>
<ul>
<li>Name: <code>:reciprocal-sqrt</code></li>
<li>Default parameters
<ul>
<li><code>:a</code>, location, lower limit: <span class="math inline">\(0.5\)</span></li>
</ul></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/247.png" class="clay-image img-fluid"></td>
<td><img src="random_files/248.png" class="clay-image img-fluid"></td>
<td><img src="random_files/249.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/250.png" class="clay-image img-fluid"></td>
<td><img src="random_files/251.png" class="clay-image img-fluid"></td>
<td><img src="random_files/252.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="students-t" class="level4">
<h4 class="anchored" data-anchor-id="students-t">Student’s t</h4>
<ul>
<li>Name: <code>:t</code></li>
<li>Default parameters
<ul>
<li><code>:degrees-of-freedom</code>: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Student%27s_t-distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/TDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:degrees-of-freedom 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/253.png" class="clay-image img-fluid"></td>
<td><img src="random_files/254.png" class="clay-image img-fluid"></td>
<td><img src="random_files/255.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:degrees-of-freedom 50}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/256.png" class="clay-image img-fluid"></td>
<td><img src="random_files/257.png" class="clay-image img-fluid"></td>
<td><img src="random_files/258.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="triangular" class="level4">
<h4 class="anchored" data-anchor-id="triangular">Triangular</h4>
<ul>
<li>Name: <code>:triangular</code></li>
<li>Default parameters
<ul>
<li><code>:a</code>, lower limit: <span class="math inline">\(-1.0\)</span></li>
<li><code>:b</code>, mode: <span class="math inline">\(0.0\)</span></li>
<li><code>:c</code>, upper limit: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Triangular_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/TriangularDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a -1, :b 1, :c 0}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/259.png" class="clay-image img-fluid"></td>
<td><img src="random_files/260.png" class="clay-image img-fluid"></td>
<td><img src="random_files/261.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:a -0.5, :b 1, :c 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/262.png" class="clay-image img-fluid"></td>
<td><img src="random_files/263.png" class="clay-image img-fluid"></td>
<td><img src="random_files/264.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="uniform" class="level4">
<h4 class="anchored" data-anchor-id="uniform">Uniform</h4>
<ul>
<li>Name: <code>:uniform-real</code></li>
<li>Default parameters
<ul>
<li><code>:lower</code>, lower limit: <span class="math inline">\(0.0\)</span></li>
<li><code>:upper</code>, upper limit: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Continuous_uniform_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/UniformRealDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lower 0, :upper 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/265.png" class="clay-image img-fluid"></td>
<td><img src="random_files/266.png" class="clay-image img-fluid"></td>
<td><img src="random_files/267.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lower -1, :upper 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/268.png" class="clay-image img-fluid"></td>
<td><img src="random_files/269.png" class="clay-image img-fluid"></td>
<td><img src="random_files/270.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="watson-g" class="level4">
<h4 class="anchored" data-anchor-id="watson-g">Watson G</h4>
<ul>
<li>Name: <code>:watson-g</code></li>
<li>Default parameters
<ul>
<li><code>:n</code>: <span class="math inline">\(2\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1WatsonGDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/271.png" class="clay-image img-fluid"></td>
<td><img src="random_files/272.png" class="clay-image img-fluid"></td>
<td><img src="random_files/273.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/274.png" class="clay-image img-fluid"></td>
<td><img src="random_files/275.png" class="clay-image img-fluid"></td>
<td><img src="random_files/276.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="watson-u" class="level4">
<h4 class="anchored" data-anchor-id="watson-u">Watson U</h4>
<ul>
<li>Name: <code>:watson-u</code></li>
<li>Default parameters
<ul>
<li><code>:n</code>: <span class="math inline">\(2\)</span></li>
</ul></li>
<li><a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1WatsonUDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 2}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/277.png" class="clay-image img-fluid"></td>
<td><img src="random_files/278.png" class="clay-image img-fluid"></td>
<td><img src="random_files/279.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:n 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/280.png" class="clay-image img-fluid"></td>
<td><img src="random_files/281.png" class="clay-image img-fluid"></td>
<td><img src="random_files/282.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="weibull" class="level4">
<h4 class="anchored" data-anchor-id="weibull">Weibull</h4>
<ul>
<li>Name: <code>:weibull</code></li>
<li>Default parameters
<ul>
<li><code>:alpha</code>, shape: <span class="math inline">\(2.0\)</span></li>
<li><code>:beta</code>, scale: <span class="math inline">\(1.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Weibull_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/WeibullDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 2, :beta 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/283.png" class="clay-image img-fluid"></td>
<td><img src="random_files/284.png" class="clay-image img-fluid"></td>
<td><img src="random_files/285.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:alpha 1.2, :beta 0.8}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/286.png" class="clay-image img-fluid"></td>
<td><img src="random_files/287.png" class="clay-image img-fluid"></td>
<td><img src="random_files/288.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-adjusted-gamma-zaga" class="level4">
<h4 class="anchored" data-anchor-id="zero-adjusted-gamma-zaga">Zero adjusted Gamma (zaga)</h4>
<ul>
<li>Name: <code>:zaga</code></li>
<li>Default parameters:
<ul>
<li><code>:mu</code>, location: <span class="math inline">\(0.0\)</span></li>
<li><code>:sigma</code>, scale: <span class="math inline">\(1.0\)</span></li>
<li><code>:nu</code>, density at 0.0: <span class="math inline">\(0.1\)</span></li>
<li><code>:lower-tail?</code> - true</li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZAGA.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0, :sigma 1, :nu 0.1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/289.png" class="clay-image img-fluid"></td>
<td><img src="random_files/290.png" class="clay-image img-fluid"></td>
<td><img src="random_files/291.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :sigma 1, :nu 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/292.png" class="clay-image img-fluid"></td>
<td><img src="random_files/293.png" class="clay-image img-fluid"></td>
<td><img src="random_files/294.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<section id="univariate-discr." class="level3">
<h3 class="anchored" data-anchor-id="univariate-discr.">Univariate, discr.</h3>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:bb</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :bd :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:bernoulli</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :trials :p]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:binomial</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :trials :p]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:fishers-noncentral-hypergeometric</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :ns :nf :n :omega]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:geometric</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :p]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hypergeometric</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :population-size :number-of-successes :sample-size]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:logarithmic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :theta]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:nbi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:negative-binomial</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:r :p :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:pascal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :r :p]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:poisson</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :p :epsilon :max-iterations]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:uniform-int</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :lower :upper]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zabb</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :bd :nu :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zabi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :bd :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zanbi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :nu :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zibb</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :bd :nu :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zibi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :bd :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zinbi</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :nu :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zip</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zip2</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:mu :sigma :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:zipf</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :number-of-elements :exponent]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<section id="beta-binomial-bb" class="level4">
<h4 class="anchored" data-anchor-id="beta-binomial-bb">Beta Binomial (bb)</h4>
<ul>
<li>Name: <code>:bb</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:sigma</code>, dispersion: <span class="math inline">\(1.0\)</span></li>
<li><code>:bd</code>, binomial denominator: <span class="math inline">\(10\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Beta-binomial_distribution">wiki</a>, <a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/BB.html">source</a></li>
</ul>
<p>Parameters <span class="math inline">\(\mu,\sigma\)</span> in terms of <span class="math inline">\(\alpha, \beta\)</span> (Wikipedia definition)</p>
<ul>
<li>probability: <span class="math inline">\(\mu=\frac{\alpha}{\alpha+\beta}\)</span></li>
<li>dispersion: <span class="math inline">\(\sigma=\frac{1}{\alpha+\beta}\)</span></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sigma 1, :bd 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/295.png" class="clay-image img-fluid"></td>
<td><img src="random_files/296.png" class="clay-image img-fluid"></td>
<td><img src="random_files/297.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.65, :sigma 0.3, :bd 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/298.png" class="clay-image img-fluid"></td>
<td><img src="random_files/299.png" class="clay-image img-fluid"></td>
<td><img src="random_files/300.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="bernoulli" class="level4">
<h4 class="anchored" data-anchor-id="bernoulli">Bernoulli</h4>
<p>The same as Binomial with trials=1.</p>
<ul>
<li>Name: <code>:bernoulli</code></li>
<li>Default parameters
<ul>
<li><code>:p</code>, probability, <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Bernoulli_distribution">wiki</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/301.png" class="clay-image img-fluid"></td>
<td><img src="random_files/302.png" class="clay-image img-fluid"></td>
<td><img src="random_files/303.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 0.25}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/304.png" class="clay-image img-fluid"></td>
<td><img src="random_files/305.png" class="clay-image img-fluid"></td>
<td><img src="random_files/306.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="binomial" class="level4">
<h4 class="anchored" data-anchor-id="binomial">Binomial</h4>
<ul>
<li>Name: <code>:binomial</code></li>
<li>Default parameters
<ul>
<li><code>:p</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:trials</code>: <span class="math inline">\(20\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Binomial_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/BinomialDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:trials 20, :p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/307.png" class="clay-image img-fluid"></td>
<td><img src="random_files/308.png" class="clay-image img-fluid"></td>
<td><img src="random_files/309.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:trials 50, :p 0.25}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/310.png" class="clay-image img-fluid"></td>
<td><img src="random_files/311.png" class="clay-image img-fluid"></td>
<td><img src="random_files/312.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="fishers-noncentral-hypergeometric" class="level4">
<h4 class="anchored" data-anchor-id="fishers-noncentral-hypergeometric">Fisher’s noncentral hypergeometric</h4>
<ul>
<li>Name: <code>:fishers-noncentral-hypergeometric</code></li>
<li>Default parameters
<ul>
<li><code>:ns</code>, number of sucesses: <span class="math inline">\(10\)</span></li>
<li><code>:nf</code>, number of failures: <span class="math inline">\(10\)</span></li>
<li><code>:n</code>, sample size, (<span class="math inline">\(n&lt;ns+nf\)</span>): <span class="math inline">\(5\)</span></li>
<li><code>:omega</code>, odds ratio: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Fisher%27s_noncentral_hypergeometric_distribution">wiki</a>, <a href="https://github.com/JuliaStats/Distributions.jl/blob/master/src/univariate/discrete/noncentralhypergeometric.jl">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:ns 10, :nf 10, :n 5, :omega 1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/313.png" class="clay-image img-fluid"></td>
<td><img src="random_files/314.png" class="clay-image img-fluid"></td>
<td><img src="random_files/315.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:ns 30, :nf 60, :n 20, :omega 0.75}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/316.png" class="clay-image img-fluid"></td>
<td><img src="random_files/317.png" class="clay-image img-fluid"></td>
<td><img src="random_files/318.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="geometric" class="level4">
<h4 class="anchored" data-anchor-id="geometric">Geometric</h4>
<ul>
<li>Name: <code>:geometric</code></li>
<li>Default parameters
<ul>
<li><code>:p</code>, probability: <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Geometric_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/GeometricDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/319.png" class="clay-image img-fluid"></td>
<td><img src="random_files/320.png" class="clay-image img-fluid"></td>
<td><img src="random_files/321.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 0.15}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/322.png" class="clay-image img-fluid"></td>
<td><img src="random_files/323.png" class="clay-image img-fluid"></td>
<td><img src="random_files/324.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="hypergeometric" class="level4">
<h4 class="anchored" data-anchor-id="hypergeometric">Hypergeometric</h4>
<ul>
<li>Name: <code>:hypergeometric</code></li>
<li>Default parameters
<ul>
<li><code>:population-size</code>: <span class="math inline">\(100\)</span></li>
<li><code>:number-of-successes</code>: $50%</li>
<li><code>:sample-size</code>: $25%</li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Hypergeometric_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/HypergeometricDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:population-size 100, :number-of-successes 50, :sample-size 25}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/325.png" class="clay-image img-fluid"></td>
<td><img src="random_files/326.png" class="clay-image img-fluid"></td>
<td><img src="random_files/327.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:population-size 2000, :number-of-successes 20, :sample-size 200}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/328.png" class="clay-image img-fluid"></td>
<td><img src="random_files/329.png" class="clay-image img-fluid"></td>
<td><img src="random_files/330.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="logarithmic" class="level4">
<h4 class="anchored" data-anchor-id="logarithmic">Logarithmic</h4>
<ul>
<li>Name: <code>:logarithmic</code></li>
<li>Default parameters
<ul>
<li><code>:theta</code>, shape: <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Logarithmic_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdist_1_1LogarithmicDist.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:theta 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/331.png" class="clay-image img-fluid"></td>
<td><img src="random_files/332.png" class="clay-image img-fluid"></td>
<td><img src="random_files/333.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:theta 0.99}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/334.png" class="clay-image img-fluid"></td>
<td><img src="random_files/335.png" class="clay-image img-fluid"></td>
<td><img src="random_files/336.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="negative-binomial" class="level4">
<h4 class="anchored" data-anchor-id="negative-binomial">Negative binomial</h4>
<ul>
<li>Name: <code>:negative-binomial</code></li>
<li>Default parameters
<ul>
<li><code>:r</code>, number of successes: <span class="math inline">\(20\)</span>, can be a real number.</li>
<li><code>:p</code>, probability of success: <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Negative_binomial_distribution">wiki</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:r 20, :p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/337.png" class="clay-image img-fluid"></td>
<td><img src="random_files/338.png" class="clay-image img-fluid"></td>
<td><img src="random_files/339.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:r 100, :p 0.95}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/340.png" class="clay-image img-fluid"></td>
<td><img src="random_files/341.png" class="clay-image img-fluid"></td>
<td><img src="random_files/342.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:r 21.2345, :p 0.7}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/343.png" class="clay-image img-fluid"></td>
<td><img src="random_files/344.png" class="clay-image img-fluid"></td>
<td><img src="random_files/345.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="pascal" class="level4">
<h4 class="anchored" data-anchor-id="pascal">Pascal</h4>
<p>The same as <code>:negative-binomial</code> but <code>r</code> is strictly integer</p>
<ul>
<li>Name: <code>:pascal</code></li>
<li>Default parameters
<ul>
<li><code>:r</code>, number of successes: <span class="math inline">\(20\)</span></li>
<li><code>:p</code>, probability of success: <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Negative_binomial_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/PascalDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:r 20, :p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/346.png" class="clay-image img-fluid"></td>
<td><img src="random_files/347.png" class="clay-image img-fluid"></td>
<td><img src="random_files/348.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:r 100, :p 0.95}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/349.png" class="clay-image img-fluid"></td>
<td><img src="random_files/350.png" class="clay-image img-fluid"></td>
<td><img src="random_files/351.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="poisson" class="level4">
<h4 class="anchored" data-anchor-id="poisson">Poisson</h4>
<ul>
<li>Name: <code>:poisson</code></li>
<li>Default parameters
<ul>
<li><code>:p</code>, lambda, mean: <span class="math inline">\(0.5\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Poisson_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/PoissonDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/352.png" class="clay-image img-fluid"></td>
<td><img src="random_files/353.png" class="clay-image img-fluid"></td>
<td><img src="random_files/354.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:p 4}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/355.png" class="clay-image img-fluid"></td>
<td><img src="random_files/356.png" class="clay-image img-fluid"></td>
<td><img src="random_files/357.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="uniform-1" class="level4">
<h4 class="anchored" data-anchor-id="uniform-1">Uniform</h4>
<ul>
<li>Name: <code>:uniform-int</code></li>
<li>Default parameters
<ul>
<li><code>:lower</code>, lower bound: <span class="math inline">\(0\)</span></li>
<li><code>:upper</code>, upper bound: <span class="math inline">\(2147483647\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Discrete_uniform_distribution">wiki</a>,<a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/UniformIntegerDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lower 0, :upper 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/358.png" class="clay-image img-fluid"></td>
<td><img src="random_files/359.png" class="clay-image img-fluid"></td>
<td><img src="random_files/360.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:lower -5, :upper 5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/361.png" class="clay-image img-fluid"></td>
<td><img src="random_files/362.png" class="clay-image img-fluid"></td>
<td><img src="random_files/363.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-adjusted-beta-binomial-zabb" class="level4">
<h4 class="anchored" data-anchor-id="zero-adjusted-beta-binomial-zabb">Zero Adjusted Beta Binomial (zabb)</h4>
<ul>
<li>Name: <code>:zabb</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:sigma</code>, dispersion: <span class="math inline">\(0.1\)</span></li>
<li><code>:nu</code>, probability at 0.0: <span class="math inline">\(0.1\)</span></li>
<li><code>:bd</code>, binomial denominator: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZABB.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sigma 0.1, :bd 10, :nu 0.1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/364.png" class="clay-image img-fluid"></td>
<td><img src="random_files/365.png" class="clay-image img-fluid"></td>
<td><img src="random_files/366.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 0.1, :mu 0.65, :sigma 0.3, :bd 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/367.png" class="clay-image img-fluid"></td>
<td><img src="random_files/368.png" class="clay-image img-fluid"></td>
<td><img src="random_files/369.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-adjusted-binomial-zabi" class="level4">
<h4 class="anchored" data-anchor-id="zero-adjusted-binomial-zabi">Zero Adjusted Binomial (zabi)</h4>
<ul>
<li>Name: <code>:zabi</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:sigma</code>, probability at 0.0: <span class="math inline">\(0.1\)</span></li>
<li><code>:bd</code>, binomial denominator: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZABI.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sigma 0.1, :bd 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/370.png" class="clay-image img-fluid"></td>
<td><img src="random_files/371.png" class="clay-image img-fluid"></td>
<td><img src="random_files/372.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.65, :sigma 0.3, :bd 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/373.png" class="clay-image img-fluid"></td>
<td><img src="random_files/374.png" class="clay-image img-fluid"></td>
<td><img src="random_files/375.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-adjusted-negative-binomial-zanbi" class="level4">
<h4 class="anchored" data-anchor-id="zero-adjusted-negative-binomial-zanbi">Zero Adjusted Negative Binomial (zanbi)</h4>
<ul>
<li>Name: <code>:zanbi</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(1.0\)</span></li>
<li><code>:sigma</code>, dispersion: <span class="math inline">\(1.0\)</span></li>
<li><code>:nu</code>, probability at 0.0: <span class="math inline">\(0.3\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZANBI.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :sigma 1, :nu 0.3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/376.png" class="clay-image img-fluid"></td>
<td><img src="random_files/377.png" class="clay-image img-fluid"></td>
<td><img src="random_files/378.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 0.1, :mu 2, :sigma 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/379.png" class="clay-image img-fluid"></td>
<td><img src="random_files/380.png" class="clay-image img-fluid"></td>
<td><img src="random_files/381.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-inflated-beta-binomial-zibb" class="level4">
<h4 class="anchored" data-anchor-id="zero-inflated-beta-binomial-zibb">Zero Inflated Beta Binomial (zibb)</h4>
<ul>
<li>Name: <code>:zibb</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:sigma</code>, dispersion: <span class="math inline">\(0.1\)</span></li>
<li><code>:nu</code>, probability factor at 0.0: <span class="math inline">\(0.1\)</span></li>
<li><code>:bd</code>, binomial denominator: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZABB.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sigma 0.5, :bd 10, :nu 0.1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/382.png" class="clay-image img-fluid"></td>
<td><img src="random_files/383.png" class="clay-image img-fluid"></td>
<td><img src="random_files/384.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 0.1, :mu 0.65, :sigma 1, :bd 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/385.png" class="clay-image img-fluid"></td>
<td><img src="random_files/386.png" class="clay-image img-fluid"></td>
<td><img src="random_files/387.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-inflated-binomial-zibi" class="level4">
<h4 class="anchored" data-anchor-id="zero-inflated-binomial-zibi">Zero Inflated Binomial (zibi)</h4>
<ul>
<li>Name: <code>:zibi</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, probability: <span class="math inline">\(0.5\)</span></li>
<li><code>:sigma</code>, probability factor at 0.0: <span class="math inline">\(0.1\)</span></li>
<li><code>:bd</code>, binomial denominator: <span class="math inline">\(1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZABI.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.5, :sigma 0.1, :bd 10}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/388.png" class="clay-image img-fluid"></td>
<td><img src="random_files/389.png" class="clay-image img-fluid"></td>
<td><img src="random_files/390.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 0.65, :sigma 0.3, :bd 20}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/391.png" class="clay-image img-fluid"></td>
<td><img src="random_files/392.png" class="clay-image img-fluid"></td>
<td><img src="random_files/393.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-inflated-negative-binomial-zinbi" class="level4">
<h4 class="anchored" data-anchor-id="zero-inflated-negative-binomial-zinbi">Zero Inflated Negative Binomial (zinbi)</h4>
<ul>
<li>Name: <code>:zinbi</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(1.0\)</span></li>
<li><code>:sigma</code>, dispersion: <span class="math inline">\(1.0\)</span></li>
<li><code>:nu</code>, probability factor at 0.0: <span class="math inline">\(0.3\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZANBI.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 1, :sigma 1, :nu 0.3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/394.png" class="clay-image img-fluid"></td>
<td><img src="random_files/395.png" class="clay-image img-fluid"></td>
<td><img src="random_files/396.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:nu 0.1, :mu 2, :sigma 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/397.png" class="clay-image img-fluid"></td>
<td><img src="random_files/398.png" class="clay-image img-fluid"></td>
<td><img src="random_files/399.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-inflated-poisson-zip" class="level4">
<h4 class="anchored" data-anchor-id="zero-inflated-poisson-zip">Zero Inflated Poisson (zip)</h4>
<ul>
<li>Name: <code>:zip</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(5\)</span></li>
<li><code>:sigma</code>, probability at 0.0: <span class="math inline">\(0.1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZIP.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 5, :sigma 0.1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/400.png" class="clay-image img-fluid"></td>
<td><img src="random_files/401.png" class="clay-image img-fluid"></td>
<td><img src="random_files/402.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 2, :sigma 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/403.png" class="clay-image img-fluid"></td>
<td><img src="random_files/404.png" class="clay-image img-fluid"></td>
<td><img src="random_files/405.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zero-inflated-poisson-type-2-zip2" class="level4">
<h4 class="anchored" data-anchor-id="zero-inflated-poisson-type-2-zip2">Zero Inflated Poisson, type 2 (zip2)</h4>
<ul>
<li>Name: <code>:zip2</code></li>
<li>Default parameters
<ul>
<li><code>:mu</code>, mean: <span class="math inline">\(5\)</span></li>
<li><code>:sigma</code>, probability at 0.0: <span class="math inline">\(0.1\)</span></li>
</ul></li>
<li><a href="https://search.r-project.org/CRAN/refmans/gamlss.dist/html/ZIP2.html">source</a>, <a href="https://www.gamlss.com/wp-content/uploads/2018/01/DistributionsForModellingLocationScaleandShape.pdf">book</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 5, :sigma 0.1}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/406.png" class="clay-image img-fluid"></td>
<td><img src="random_files/407.png" class="clay-image img-fluid"></td>
<td><img src="random_files/408.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:mu 2, :sigma 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/409.png" class="clay-image img-fluid"></td>
<td><img src="random_files/410.png" class="clay-image img-fluid"></td>
<td><img src="random_files/411.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="zipf" class="level4">
<h4 class="anchored" data-anchor-id="zipf">Zipf</h4>
<ul>
<li>Name: <code>:zipf</code></li>
<li>Default parameters
<ul>
<li><code>:number-of-elements</code>: <span class="math inline">\(100\)</span></li>
<li><code>:exponent</code>: <span class="math inline">\(3.0\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Zipf%27s_law">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/ZipfDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:number-of-elements 100, :exponent 3}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/412.png" class="clay-image img-fluid"></td>
<td><img src="random_files/413.png" class="clay-image img-fluid"></td>
<td><img src="random_files/414.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>{:number-of-elements 20, :exponent 0.5}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/415.png" class="clay-image img-fluid"></td>
<td><img src="random_files/416.png" class="clay-image img-fluid"></td>
<td><img src="random_files/417.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<section id="multivariate" class="level3">
<h3 class="anchored" data-anchor-id="multivariate">Multivariate</h3>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
<th data-quarto-table-cell-role="th">continuous?</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:dirichlet</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:alpha :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>true</td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:multi-normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:means :covariances :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>true</td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:multinomial</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:n :ps :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td>false</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<section id="dirichlet" class="level4">
<h4 class="anchored" data-anchor-id="dirichlet">Dirichlet</h4>
<ul>
<li>Name: <code>:dirichlet</code></li>
<li>Default parameters
<ul>
<li><code>:alpha</code>, concentration, vector: <code>[1 1]</code></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Dirichlet_distribution">wiki</a></li>
</ul>
<p>Please note, <code>PDF</code> doesn’t validate input.</p>
<p>Projections of the 2d and 3d Dirichlet distributions.</p>
<ul>
<li>2d case - all vectors <span class="math inline">\([x,1-x]\)</span></li>
<li>3d case - all (supported) vectors <span class="math inline">\([x,y,1-x-y]\)</span></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [0.6 0.6]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [3 3]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [0.5 2]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/418.png" class="clay-image img-fluid"></td>
<td><img src="random_files/419.png" class="clay-image img-fluid"></td>
<td><img src="random_files/420.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [3 1 3]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [3 3 3]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:alpha [1 3 1]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/421.png" class="clay-image img-fluid"></td>
<td><img src="random_files/422.png" class="clay-image img-fluid"></td>
<td><img src="random_files/423.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb341"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> dirichlet3 </span>(r/distribution <span class="at">:dirichlet</span> {<span class="at">:alpha</span> [<span class="dv">3</span> <span class="dv">1</span> <span class="dv">3</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb342"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true" tabindex="-1"></a>(r/sample dirichlet3) <span class="co">;; =&gt; [0.5003973707331635 0.11790124546181052 0.381701383805026]</span></span>
<span id="cb342-2"><a href="#cb342-2" aria-hidden="true" tabindex="-1"></a>(r/sample dirichlet3) <span class="co">;; =&gt; [0.5675115204938257 0.11000860520108965 0.3224798743050848]</span></span>
<span id="cb342-3"><a href="#cb342-3" aria-hidden="true" tabindex="-1"></a>(r/pdf dirichlet3 [<span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.5</span>]) <span class="co">;; =&gt; 1.8000000000000003</span></span>
<span id="cb342-4"><a href="#cb342-4" aria-hidden="true" tabindex="-1"></a>(r/pdf dirichlet3 [<span class="fl">0.3</span> <span class="fl">0.5</span> <span class="fl">0.2</span>]) <span class="co">;; =&gt; 0.648</span></span>
<span id="cb342-5"><a href="#cb342-5" aria-hidden="true" tabindex="-1"></a>(r/pdf dirichlet3 [<span class="fl">0.5</span> <span class="fl">0.2</span> <span class="fl">0.3</span>]) <span class="co">;; =&gt; 4.05</span></span>
<span id="cb342-6"><a href="#cb342-6" aria-hidden="true" tabindex="-1"></a>(r/means dirichlet3) <span class="co">;; =&gt; (0.42857142857142855 0.14285714285714285 0.42857142857142855)</span></span>
<span id="cb342-7"><a href="#cb342-7" aria-hidden="true" tabindex="-1"></a>(r/covariance dirichlet3) <span class="co">;; =&gt; [[0.03061224489795918 -0.007653061224489796 -0.02295918367346939] [-0.007653061224489796 0.015306122448979591 -0.007653061224489796] [-0.02295918367346939 -0.007653061224489796 0.03061224489795918]]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="multi-normal" class="level4">
<h4 class="anchored" data-anchor-id="multi-normal">Multi normal</h4>
<ul>
<li>Name: <code>:multi-normal</code></li>
<li>Default parameters
<ul>
<li><code>:means</code>, vector: <code>[0 0]</code></li>
<li><code>:covariances</code>, vector of vectors (row-wise matrix): <code>[[1 0] [0 1]]</code></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Multivariate_normal_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/MultivariateNormalDistribution.html">source</a></li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:means [0 0], :convariances [[1 0] [0 1]]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/424.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:means [0.5 0], :convariances [[0.5 -0.1] [0.1 0.1]]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/425.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>{:means [0 -0.5], :convariances [[1 0.2] [0.3 1]]}</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/426.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="multinomial" class="level4">
<h4 class="anchored" data-anchor-id="multinomial">Multinomial</h4>
<ul>
<li>Name: <code>:multinomial</code></li>
<li>Default parameters
<ul>
<li><code>:ps</code>, probabilities or weights, vector: <code>[0.5 0.5]</code></li>
<li><code>:trials</code>: <span class="math inline">\(20\)</span></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Multinomial_distribution">wiki</a>, <a href="http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1probdistmulti_1_1MultinomialDist.html">source</a></li>
</ul>
<div class="sourceClojure">
<div class="sourceCode" id="cb346"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> multinomial </span>(r/distribution <span class="at">:multinomial</span> {<span class="at">:trials</span> <span class="dv">150</span> <span class="at">:ps</span> [<span class="dv">1</span> <span class="dv">2</span> <span class="dv">3</span> <span class="dv">4</span> <span class="dv">5</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb347"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true" tabindex="-1"></a>(r/sample multinomial) <span class="co">;; =&gt; [11 21 28 38 52]</span></span>
<span id="cb347-2"><a href="#cb347-2" aria-hidden="true" tabindex="-1"></a>(r/sample multinomial) <span class="co">;; =&gt; [7 18 29 45 51]</span></span>
<span id="cb347-3"><a href="#cb347-3" aria-hidden="true" tabindex="-1"></a>(r/pdf multinomial [<span class="dv">10</span> <span class="dv">10</span> <span class="dv">10</span> <span class="dv">10</span> <span class="dv">110</span>]) <span class="co">;; =&gt; 3.9088379874482466E-28</span></span>
<span id="cb347-4"><a href="#cb347-4" aria-hidden="true" tabindex="-1"></a>(r/pdf multinomial [<span class="dv">10</span> <span class="dv">20</span> <span class="dv">30</span> <span class="dv">40</span> <span class="dv">50</span>]) <span class="co">;; =&gt; 8.791729390927823E-5</span></span>
<span id="cb347-5"><a href="#cb347-5" aria-hidden="true" tabindex="-1"></a>(r/pdf multinomial [<span class="dv">110</span> <span class="dv">10</span> <span class="dv">10</span> <span class="dv">10</span> <span class="dv">10</span>]) <span class="co">;; =&gt; 4.955040820983416E-98</span></span>
<span id="cb347-6"><a href="#cb347-6" aria-hidden="true" tabindex="-1"></a>(r/means multinomial) <span class="co">;; =&gt; (10.0 20.0 30.0 40.0 50.0)</span></span>
<span id="cb347-7"><a href="#cb347-7" aria-hidden="true" tabindex="-1"></a>(r/covariance multinomial) <span class="co">;; =&gt; [[9.333333333333334 -1.3333333333333333 -2.0 -2.6666666666666665 -3.333333333333333] [-1.3333333333333333 17.333333333333336 -4.0 -5.333333333333333 -6.666666666666666] [-2.0 -4.0 24.0 -8.0 -10.0] [-2.6666666666666665 -5.333333333333333 -8.0 29.333333333333336 -13.333333333333332] [-3.3333333333333335 -6.666666666666667 -10.0 -13.333333333333334 33.333333333333336]]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="mixture" class="level3">
<h3 class="anchored" data-anchor-id="mixture">Mixture</h3>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:mixture</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:distrs :weights :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>Mixture distribution</p>
<p>Creates a distribution from other distributions and weights.</p>
<ul>
<li>Name: <code>:mixture</code></li>
<li>Default parameters:
<ul>
<li><code>:distrs</code>, list of distributions: <code>[default-normal]</code></li>
<li><code>:weights</code>, list of weights: <code>[1.0]</code></li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Mixture_distribution">wiki</a></li>
</ul>
<p>Please note: <code>set-seed!</code> doesn’t affect distributions which are part of the mixture</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb350"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> three-normals</span></span>
<span id="cb350-2"><a href="#cb350-2" aria-hidden="true" tabindex="-1"></a>  (r/distribution <span class="at">:mixture</span> {<span class="at">:distrs</span> [(r/distribution <span class="at">:normal</span> {<span class="at">:mu</span> -<span class="dv">2</span> <span class="at">:sd</span> <span class="dv">2</span>})</span>
<span id="cb350-3"><a href="#cb350-3" aria-hidden="true" tabindex="-1"></a>                                     (r/distribution <span class="at">:normal</span>)</span>
<span id="cb350-4"><a href="#cb350-4" aria-hidden="true" tabindex="-1"></a>                                     (r/distribution <span class="at">:normal</span> {<span class="at">:mu</span> <span class="dv">2</span> <span class="at">:sd</span> <span class="fl">0.5</span>})]</span>
<span id="cb350-5"><a href="#cb350-5" aria-hidden="true" tabindex="-1"></a>                            <span class="at">:weights</span> [<span class="dv">2</span> <span class="dv">1</span> <span class="dv">3</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb351"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> mixture-of-three</span></span>
<span id="cb351-2"><a href="#cb351-2" aria-hidden="true" tabindex="-1"></a>  (r/distribution <span class="at">:mixture</span> {<span class="at">:distrs</span> [(r/distribution <span class="at">:gamma</span>)</span>
<span id="cb351-3"><a href="#cb351-3" aria-hidden="true" tabindex="-1"></a>                                     (r/distribution <span class="at">:laplace</span>)</span>
<span id="cb351-4"><a href="#cb351-4" aria-hidden="true" tabindex="-1"></a>                                     (r/distribution <span class="at">:log-logistic</span>)]</span>
<span id="cb351-5"><a href="#cb351-5" aria-hidden="true" tabindex="-1"></a>                            <span class="at">:weights</span> [<span class="dv">2</span> <span class="dv">1</span> <span class="dv">3</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>three normals</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/427.png" class="clay-image img-fluid"></td>
<td><img src="random_files/428.png" class="clay-image img-fluid"></td>
<td><img src="random_files/429.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>gamma, laplace and log-logistic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/430.png" class="clay-image img-fluid"></td>
<td><img src="random_files/431.png" class="clay-image img-fluid"></td>
<td><img src="random_files/432.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb354"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true" tabindex="-1"></a>(r/sample mixture-of-three) <span class="co">;; =&gt; 0.717026180380196</span></span>
<span id="cb354-2"><a href="#cb354-2" aria-hidden="true" tabindex="-1"></a>(r/sample mixture-of-three) <span class="co">;; =&gt; 1.4580145111592928</span></span>
<span id="cb354-3"><a href="#cb354-3" aria-hidden="true" tabindex="-1"></a>(r/pdf mixture-of-three <span class="dv">0</span>) <span class="co">;; =&gt; 0.08333333333333333</span></span>
<span id="cb354-4"><a href="#cb354-4" aria-hidden="true" tabindex="-1"></a>(r/pdf mixture-of-three <span class="dv">1</span>) <span class="co">;; =&gt; 0.45620084174033965</span></span>
<span id="cb354-5"><a href="#cb354-5" aria-hidden="true" tabindex="-1"></a>(r/pdf mixture-of-three <span class="dv">2</span>) <span class="co">;; =&gt; 0.14666525453903217</span></span>
<span id="cb354-6"><a href="#cb354-6" aria-hidden="true" tabindex="-1"></a>(r/cdf mixture-of-three <span class="dv">0</span>) <span class="co">;; =&gt; 0.08333333333333333</span></span>
<span id="cb354-7"><a href="#cb354-7" aria-hidden="true" tabindex="-1"></a>(r/cdf mixture-of-three <span class="dv">1</span>) <span class="co">;; =&gt; 0.4160780500460631</span></span>
<span id="cb354-8"><a href="#cb354-8" aria-hidden="true" tabindex="-1"></a>(r/cdf mixture-of-three <span class="dv">2</span>) <span class="co">;; =&gt; 0.6879135433937651</span></span>
<span id="cb354-9"><a href="#cb354-9" aria-hidden="true" tabindex="-1"></a>(r/icdf mixture-of-three <span class="fl">0.01</span>) <span class="co">;; =&gt; -2.1202635780176586</span></span>
<span id="cb354-10"><a href="#cb354-10" aria-hidden="true" tabindex="-1"></a>(r/icdf mixture-of-three <span class="fl">0.5</span>) <span class="co">;; =&gt; 1.2029317631660499</span></span>
<span id="cb354-11"><a href="#cb354-11" aria-hidden="true" tabindex="-1"></a>(r/icdf mixture-of-three <span class="fl">0.99</span>) <span class="co">;; =&gt; 10.808075578087667</span></span>
<span id="cb354-12"><a href="#cb354-12" aria-hidden="true" tabindex="-1"></a>(r/mean mixture-of-three) <span class="co">;; =&gt; 1.937933121411406</span></span>
<span id="cb354-13"><a href="#cb354-13" aria-hidden="true" tabindex="-1"></a>(r/variance mixture-of-three) <span class="co">;; =&gt; 5.7869481264261236</span></span>
<span id="cb354-14"><a href="#cb354-14" aria-hidden="true" tabindex="-1"></a>(r/lower-bound mixture-of-three) <span class="co">;; =&gt; ##-Inf</span></span>
<span id="cb354-15"><a href="#cb354-15" aria-hidden="true" tabindex="-1"></a>(r/upper-bound mixture-of-three) <span class="co">;; =&gt; ##Inf</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="truncated" class="level3">
<h3 class="anchored" data-anchor-id="truncated">Truncated</h3>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:truncated</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:distr :left :right :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<ul>
<li>Name: <code>:truncated</code></li>
<li>Default parameters
<ul>
<li><code>:distr</code>, distribution to truncate: <code>default-normal</code></li>
<li><code>:left</code>, lower boundary</li>
<li><code>:right</code>, upper boundary</li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Truncated_distribution">wiki</a></li>
</ul>
<p>By default boundaries are the same as boundaries from a distributions. This way you can make one side truncation.</p>
<p>Please note: derived <code>mean</code> or <code>variance</code> is not calculated. Also, <code>set-seed!</code> doesn’t affect original distribution.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb357"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> truncated-normal </span>(r/distribution <span class="at">:truncated</span> {<span class="at">:distr</span> r/default-normal</span>
<span id="cb357-2"><a href="#cb357-2" aria-hidden="true" tabindex="-1"></a>                                                  <span class="at">:left</span> -<span class="dv">2</span> <span class="at">:right</span> <span class="dv">2</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb358"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> left-truncated-laplace </span>(r/distribution <span class="at">:truncated</span> {<span class="at">:distr</span> (r/distribution <span class="at">:laplace</span>)</span>
<span id="cb358-2"><a href="#cb358-2" aria-hidden="true" tabindex="-1"></a>                                                        <span class="at">:left</span> -<span class="fl">0.5</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>truncated normal</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/433.png" class="clay-image img-fluid"></td>
<td><img src="random_files/434.png" class="clay-image img-fluid"></td>
<td><img src="random_files/435.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>trucated levy (left side)</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/436.png" class="clay-image img-fluid"></td>
<td><img src="random_files/437.png" class="clay-image img-fluid"></td>
<td><img src="random_files/438.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb361"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true" tabindex="-1"></a>(r/sample truncated-normal) <span class="co">;; =&gt; -0.131952017562289</span></span>
<span id="cb361-2"><a href="#cb361-2" aria-hidden="true" tabindex="-1"></a>(r/sample truncated-normal) <span class="co">;; =&gt; 0.41241656836830154</span></span>
<span id="cb361-3"><a href="#cb361-3" aria-hidden="true" tabindex="-1"></a>(r/pdf truncated-normal <span class="fl">2.0000001</span>) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb361-4"><a href="#cb361-4" aria-hidden="true" tabindex="-1"></a>(r/pdf truncated-normal <span class="fl">2.0</span>) <span class="co">;; =&gt; 0.0565646741125192</span></span>
<span id="cb361-5"><a href="#cb361-5" aria-hidden="true" tabindex="-1"></a>(r/cdf truncated-normal <span class="fl">2.0</span>) <span class="co">;; =&gt; 1.0</span></span>
<span id="cb361-6"><a href="#cb361-6" aria-hidden="true" tabindex="-1"></a>(r/cdf truncated-normal <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.5000000000000001</span></span>
<span id="cb361-7"><a href="#cb361-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf truncated-normal) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (-1.9982352293163053 -1.3914582123358836E-16 1.9982352293163053)</span></span>
<span id="cb361-8"><a href="#cb361-8" aria-hidden="true" tabindex="-1"></a>(r/lower-bound truncated-normal) <span class="co">;; =&gt; -2.0</span></span>
<span id="cb361-9"><a href="#cb361-9" aria-hidden="true" tabindex="-1"></a>(r/upper-bound truncated-normal) <span class="co">;; =&gt; 2.0</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="from-data" class="level3">
<h3 class="anchored" data-anchor-id="from-data">From data</h3>
<p>All below distributions can be constructed from datasets or list of values with probabilities.</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th">name</th>
<th data-quarto-table-cell-role="th">parameters</th>
<th data-quarto-table-cell-role="th">continuous?</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:continuous-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :steps :kde :bandwidth :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>true</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:kde</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :steps :kde :bandwidth :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>true</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:empirical</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :bin-count :data]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>true</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:real-discrete-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :probabilities :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>false</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:integer-discrete-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :probabilities :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>false</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:categorical-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :probabilities :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>false</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:enumerated-real</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:rng :data :probabilities]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>false</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:enumerated-int</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure printed-clojure code-with-copy"><code>[:data :probabilities :rng]</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>false</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<section id="continuous" class="level4">
<h4 class="anchored" data-anchor-id="continuous">Continuous</h4>
<p>Continous distribution build from data is based on KDE (Kernel Density Estimation) and PDF integration for CDF and iCDF. Mean and variance are calculated from samples.</p>
<p><code>:continous-distribution</code> and <code>:kde</code> are two names for the same distribution</p>
<ul>
<li>Name: <code>:continuous-distribution</code> or <code>:kde</code></li>
<li>Default parameters:
<ul>
<li><code>:data</code>, samples, sequence of numbers</li>
<li><code>:kde</code>, density estimation kernel: <code>:epenechnikov</code></li>
<li><code>:bandwidth</code>, KDE bandwidth, smoothing parameter: <code>nil</code> (auto)</li>
<li><code>:steps</code>, number of steps for PDF integration: 5000</li>
<li><code>:min-iterations</code>, number of PDF integrator iterations: <code>nil</code> (default)</li>
<li><code>:interpolator</code>, CDF/iCDF interpolator for PDF integration: <code>nil</code> (default, <code>:linear</code>)</li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Kernel_density_estimation">wiki</a>, <a href="#pdf-integration">pdf integration</a></li>
</ul>
<div class="sourceClojure">
<div class="sourceCode" id="cb386"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> random-data </span>(<span class="kw">repeatedly</span> <span class="dv">1000</span> (<span class="kw">fn</span> [] (<span class="kw">+</span> (<span class="kw">*</span> (r/drand -<span class="dv">2</span> <span class="dv">2</span>) (r/drand -<span class="dv">2</span> <span class="dv">2</span>))</span>
<span id="cb386-2"><a href="#cb386-2" aria-hidden="true" tabindex="-1"></a>                                            (m/sqrt (<span class="kw">*</span> (r/drand) (r/drand)))))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb387"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> kde-distr </span>(r/distribution <span class="at">:continuous-distribution</span> {<span class="at">:data</span> random-data}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>default</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/439.png" class="clay-image img-fluid"></td>
<td><img src="random_files/440.png" class="clay-image img-fluid"></td>
<td><img src="random_files/441.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>bandwidth=1.0</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/442.png" class="clay-image img-fluid"></td>
<td><img src="random_files/443.png" class="clay-image img-fluid"></td>
<td><img src="random_files/444.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>gaussian kernel</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/445.png" class="clay-image img-fluid"></td>
<td><img src="random_files/446.png" class="clay-image img-fluid"></td>
<td><img src="random_files/447.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>triangular kernel, bandwidth=0.1</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/448.png" class="clay-image img-fluid"></td>
<td><img src="random_files/449.png" class="clay-image img-fluid"></td>
<td><img src="random_files/450.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb392"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true" tabindex="-1"></a>(r/sample kde-distr) <span class="co">;; =&gt; -0.12303128780717573</span></span>
<span id="cb392-2"><a href="#cb392-2" aria-hidden="true" tabindex="-1"></a>(r/sample kde-distr) <span class="co">;; =&gt; -1.6953982126183949</span></span>
<span id="cb392-3"><a href="#cb392-3" aria-hidden="true" tabindex="-1"></a>(r/pdf kde-distr <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.2895732291670891</span></span>
<span id="cb392-4"><a href="#cb392-4" aria-hidden="true" tabindex="-1"></a>(r/cdf kde-distr <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.31552593767229803</span></span>
<span id="cb392-5"><a href="#cb392-5" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf kde-distr) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (-4.036565369328684 0.49883262884502827 5.012273231015241)</span></span>
<span id="cb392-6"><a href="#cb392-6" aria-hidden="true" tabindex="-1"></a>(r/lower-bound kde-distr) <span class="co">;; =&gt; -4.1635203556799745</span></span>
<span id="cb392-7"><a href="#cb392-7" aria-hidden="true" tabindex="-1"></a>(r/upper-bound kde-distr) <span class="co">;; =&gt; 5.139228217366505</span></span>
<span id="cb392-8"><a href="#cb392-8" aria-hidden="true" tabindex="-1"></a>(r/mean kde-distr) <span class="co">;; =&gt; 0.5262235226230889</span></span>
<span id="cb392-9"><a href="#cb392-9" aria-hidden="true" tabindex="-1"></a>(r/variance kde-distr) <span class="co">;; =&gt; 1.8233876483481286</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<section id="kernels" class="level5">
<h5 class="anchored" data-anchor-id="kernels">Kernels</h5>
<p>Distributions for various kernels:</p>
<ul>
<li><code>:data</code>: <code>[-2 -2 -2 -1 0 1 2 -1 0 1 2 0 1 2 1 2 2]</code></li>
<li><code>:steps</code>: <code>100</code></li>
<li><code>:bandwidth</code>: auto</li>
</ul>
<p><code>fastmath.kernel/kernel-list</code> contains three types of kernels: RBF, KDE and what we can call “vector kernels” which includes Marcer, positive definite, and similar.</p>
<p>KDE kernels</p>
<p>Here’s the list of KDE kernels</p>
<p><code>:cauchy</code> , <code>:cosine</code> , <code>:epanechnikov</code> , <code>:gaussian</code> , <code>:laplace</code> , <code>:logistic</code> , <code>:quartic</code> , <code>:sigmoid</code> , <code>:silverman</code> , <code>:triangular</code> , <code>:tricube</code> , <code>:triweight</code> , <code>:uniform</code> , <code>:wigner</code></p>
<p>KDE kernels distribution plots</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:cauchy</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/451.png" class="clay-image img-fluid"></td>
<td><img src="random_files/452.png" class="clay-image img-fluid"></td>
<td><img src="random_files/453.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:cosine</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/454.png" class="clay-image img-fluid"></td>
<td><img src="random_files/455.png" class="clay-image img-fluid"></td>
<td><img src="random_files/456.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:epanechnikov</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/457.png" class="clay-image img-fluid"></td>
<td><img src="random_files/458.png" class="clay-image img-fluid"></td>
<td><img src="random_files/459.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:gaussian</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/460.png" class="clay-image img-fluid"></td>
<td><img src="random_files/461.png" class="clay-image img-fluid"></td>
<td><img src="random_files/462.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:laplace</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/463.png" class="clay-image img-fluid"></td>
<td><img src="random_files/464.png" class="clay-image img-fluid"></td>
<td><img src="random_files/465.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:logistic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/466.png" class="clay-image img-fluid"></td>
<td><img src="random_files/467.png" class="clay-image img-fluid"></td>
<td><img src="random_files/468.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:quartic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/469.png" class="clay-image img-fluid"></td>
<td><img src="random_files/470.png" class="clay-image img-fluid"></td>
<td><img src="random_files/471.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:sigmoid</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/472.png" class="clay-image img-fluid"></td>
<td><img src="random_files/473.png" class="clay-image img-fluid"></td>
<td><img src="random_files/474.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:silverman</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/475.png" class="clay-image img-fluid"></td>
<td><img src="random_files/476.png" class="clay-image img-fluid"></td>
<td><img src="random_files/477.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:triangular</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/478.png" class="clay-image img-fluid"></td>
<td><img src="random_files/479.png" class="clay-image img-fluid"></td>
<td><img src="random_files/480.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:tricube</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/481.png" class="clay-image img-fluid"></td>
<td><img src="random_files/482.png" class="clay-image img-fluid"></td>
<td><img src="random_files/483.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:triweight</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/484.png" class="clay-image img-fluid"></td>
<td><img src="random_files/485.png" class="clay-image img-fluid"></td>
<td><img src="random_files/486.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:uniform</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/487.png" class="clay-image img-fluid"></td>
<td><img src="random_files/488.png" class="clay-image img-fluid"></td>
<td><img src="random_files/489.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:wigner</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/490.png" class="clay-image img-fluid"></td>
<td><img src="random_files/491.png" class="clay-image img-fluid"></td>
<td><img src="random_files/492.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<section id="empirical" class="level4">
<h4 class="anchored" data-anchor-id="empirical">Empirical</h4>
<p>Empirical distribution calculates PDF, CDF and iCDF from a histogram.</p>
<ul>
<li>Name: <code>:empirical</code></li>
<li>Default parameters
<ul>
<li><code>:data</code>, samples, sequence of numbers</li>
<li><code>:bin-count</code>, number of bins for histogram: 10% of the size of the data</li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Empirical_distribution_function">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/random/EmpiricalDistribution.html">source</a></li>
</ul>
<div class="sourceClojure">
<div class="sourceCode" id="cb407"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> empirical-distr </span>(r/distribution <span class="at">:empirical</span> {<span class="at">:data</span> random-data}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>default</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/493.png" class="clay-image img-fluid"></td>
<td><img src="random_files/494.png" class="clay-image img-fluid"></td>
<td><img src="random_files/495.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>bin-count=10</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/496.png" class="clay-image img-fluid"></td>
<td><img src="random_files/497.png" class="clay-image img-fluid"></td>
<td><img src="random_files/498.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb410"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true" tabindex="-1"></a>(r/sample empirical-distr) <span class="co">;; =&gt; 0.8669428900917359</span></span>
<span id="cb410-2"><a href="#cb410-2" aria-hidden="true" tabindex="-1"></a>(r/sample empirical-distr) <span class="co">;; =&gt; 1.831863058899185</span></span>
<span id="cb410-3"><a href="#cb410-3" aria-hidden="true" tabindex="-1"></a>(r/pdf empirical-distr <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.3367652060230363</span></span>
<span id="cb410-4"><a href="#cb410-4" aria-hidden="true" tabindex="-1"></a>(r/cdf empirical-distr <span class="fl">0.0</span>) <span class="co">;; =&gt; 0.3060844150814384</span></span>
<span id="cb410-5"><a href="#cb410-5" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf empirical-distr) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (-3.8445695885397138 0.49402601627672765 4.820277450226245)</span></span>
<span id="cb410-6"><a href="#cb410-6" aria-hidden="true" tabindex="-1"></a>(r/lower-bound empirical-distr) <span class="co">;; =&gt; -3.8445695885397138</span></span>
<span id="cb410-7"><a href="#cb410-7" aria-hidden="true" tabindex="-1"></a>(r/upper-bound empirical-distr) <span class="co">;; =&gt; 4.820277450226245</span></span>
<span id="cb410-8"><a href="#cb410-8" aria-hidden="true" tabindex="-1"></a>(r/mean empirical-distr) <span class="co">;; =&gt; 0.5262235226230891</span></span>
<span id="cb410-9"><a href="#cb410-9" aria-hidden="true" tabindex="-1"></a>(r/variance empirical-distr) <span class="co">;; =&gt; 1.8233876483481297</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="discrete" class="level4">
<h4 class="anchored" data-anchor-id="discrete">Discrete</h4>
<ul>
<li>Default parameters
<ul>
<li><code>:data</code>, sequence of numbers (integers/longs or doubles)</li>
<li><code>:probabilities</code>, optional, probabilities or weights</li>
</ul></li>
<li><a href="https://en.wikipedia.org/wiki/Probability_distribution#Discrete_probability_distribution">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/EnumeratedRealDistribution.html">source1</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.html">source2</a></li>
</ul>
<p>Please note: data can contain duplicates.</p>
<p>There are four discrete distributions:</p>
<ul>
<li><code>:enumerated-int</code> for integers, backed by Apache Commons Math</li>
<li><code>:enumerated-real</code> for doubles, backed by Apache Commons Math</li>
<li><code>:integer-discrete-distribution</code> - for longs, custom implementation</li>
<li><code>:real-discrete-distribution</code> - for doubles, custom implementation</li>
</ul>
<p>Please note:</p>
<ul>
<li>Apache Commons Math implementation have some issues with iCDF.</li>
<li><code>:integer-discrete-distribution</code> is backed by <code>clojure.data.int-map</code></li>
</ul>
<section id="doubles" class="level5">
<h5 class="anchored" data-anchor-id="doubles">Doubles</h5>
<div class="sourceClojure">
<div class="sourceCode" id="cb411"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> data-doubles </span>(<span class="kw">repeatedly</span> <span class="dv">100</span> #(m/sq (m/approx (r/drand <span class="fl">2.0</span>) <span class="dv">1</span>))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:real-discrete-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/499.png" class="clay-image img-fluid"></td>
<td><img src="random_files/500.png" class="clay-image img-fluid"></td>
<td><img src="random_files/501.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:enumerated-real</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/502.png" class="clay-image img-fluid"></td>
<td><img src="random_files/503.png" class="clay-image img-fluid"></td>
<td><img src="random_files/504.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb414"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> real-distr </span>(r/distribution <span class="at">:real-discrete-distribution</span> {<span class="at">:data</span> [<span class="fl">0.1</span> <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span> <span class="fl">0.3</span> <span class="fl">0.2</span> <span class="fl">0.1</span>]</span>
<span id="cb414-2"><a href="#cb414-2" aria-hidden="true" tabindex="-1"></a>                                                             <span class="at">:probabilities</span> [<span class="dv">5</span> <span class="dv">4</span> <span class="dv">3</span> <span class="dv">2</span> <span class="dv">1</span> <span class="dv">5</span> <span class="dv">4</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb415"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true" tabindex="-1"></a>(r/sample real-distr) <span class="co">;; =&gt; 0.1</span></span>
<span id="cb415-2"><a href="#cb415-2" aria-hidden="true" tabindex="-1"></a>(r/sample real-distr) <span class="co">;; =&gt; 0.3</span></span>
<span id="cb415-3"><a href="#cb415-3" aria-hidden="true" tabindex="-1"></a>(r/pdf real-distr <span class="fl">0.1</span>) <span class="co">;; =&gt; 0.375</span></span>
<span id="cb415-4"><a href="#cb415-4" aria-hidden="true" tabindex="-1"></a>(r/pdf real-distr <span class="fl">0.15</span>) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb415-5"><a href="#cb415-5" aria-hidden="true" tabindex="-1"></a>(r/cdf real-distr <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.75</span></span>
<span id="cb415-6"><a href="#cb415-6" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf real-distr) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (0.1 0.2 0.4)</span></span>
<span id="cb415-7"><a href="#cb415-7" aria-hidden="true" tabindex="-1"></a>(r/lower-bound real-distr) <span class="co">;; =&gt; 0.1</span></span>
<span id="cb415-8"><a href="#cb415-8" aria-hidden="true" tabindex="-1"></a>(r/upper-bound real-distr) <span class="co">;; =&gt; 0.4</span></span>
<span id="cb415-9"><a href="#cb415-9" aria-hidden="true" tabindex="-1"></a>(r/mean real-distr) <span class="co">;; =&gt; 0.19583333333333333</span></span>
<span id="cb415-10"><a href="#cb415-10" aria-hidden="true" tabindex="-1"></a>(r/variance real-distr) <span class="co">;; =&gt; 0.008732638888888894</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="integers-longs" class="level5">
<h5 class="anchored" data-anchor-id="integers-longs">Integers / Longs</h5>
<div class="sourceClojure">
<div class="sourceCode" id="cb416"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> data-ints </span>(<span class="kw">repeatedly</span> <span class="dv">500</span> #(<span class="kw">int</span> (m/sqrt (r/drand <span class="fl">100.0</span>)))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 100%">
</colgroup>
<tbody>
<tr class="odd">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:integer-discrete-distribution</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/505.png" class="clay-image img-fluid"></td>
<td><img src="random_files/506.png" class="clay-image img-fluid"></td>
<td><img src="random_files/507.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
<tr class="even">
<td><dl>
<dt>
<div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:enumerated-int</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div>
</dt>
<dd>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/508.png" class="clay-image img-fluid"></td>
<td><img src="random_files/509.png" class="clay-image img-fluid"></td>
<td><img src="random_files/510.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb419"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> int-distr </span>(r/distribution <span class="at">:integer-discrete-distribution</span> {<span class="at">:data</span> [<span class="dv">10</span> <span class="dv">20</span> <span class="dv">30</span> <span class="dv">40</span> <span class="dv">30</span> <span class="dv">20</span> <span class="dv">10</span>]</span>
<span id="cb419-2"><a href="#cb419-2" aria-hidden="true" tabindex="-1"></a>                                                               <span class="at">:probabilities</span> [<span class="dv">5</span> <span class="dv">4</span> <span class="dv">3</span> <span class="dv">2</span> <span class="dv">1</span> <span class="dv">5</span> <span class="dv">4</span>]}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb420"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true" tabindex="-1"></a>(r/sample int-distr) <span class="co">;; =&gt; 10</span></span>
<span id="cb420-2"><a href="#cb420-2" aria-hidden="true" tabindex="-1"></a>(r/sample int-distr) <span class="co">;; =&gt; 20</span></span>
<span id="cb420-3"><a href="#cb420-3" aria-hidden="true" tabindex="-1"></a>(r/pdf int-distr <span class="dv">10</span>) <span class="co">;; =&gt; 0.375</span></span>
<span id="cb420-4"><a href="#cb420-4" aria-hidden="true" tabindex="-1"></a>(r/pdf int-distr <span class="dv">15</span>) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb420-5"><a href="#cb420-5" aria-hidden="true" tabindex="-1"></a>(r/cdf int-distr <span class="dv">20</span>) <span class="co">;; =&gt; 0.75</span></span>
<span id="cb420-6"><a href="#cb420-6" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf int-distr) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (10 20 40)</span></span>
<span id="cb420-7"><a href="#cb420-7" aria-hidden="true" tabindex="-1"></a>(r/lower-bound int-distr) <span class="co">;; =&gt; 10.0</span></span>
<span id="cb420-8"><a href="#cb420-8" aria-hidden="true" tabindex="-1"></a>(r/upper-bound int-distr) <span class="co">;; =&gt; 40.0</span></span>
<span id="cb420-9"><a href="#cb420-9" aria-hidden="true" tabindex="-1"></a>(r/mean int-distr) <span class="co">;; =&gt; 19.583333333333332</span></span>
<span id="cb420-10"><a href="#cb420-10" aria-hidden="true" tabindex="-1"></a>(r/variance int-distr) <span class="co">;; =&gt; 87.32638888888891</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="categorical" class="level4">
<h4 class="anchored" data-anchor-id="categorical">Categorical</h4>
<p>Categorical distribution is a discrete distribution which accepts any data.</p>
<ul>
<li>Name: <code>:categorical-distribution</code></li>
<li>Default parameters:
<ul>
<li><code>:data</code>, sequence of any values</li>
<li><code>:probabilities</code>, optional, probabilities or weights</li>
</ul></li>
</ul>
<p>Order for CDF/iCDF is created by calling <code>(distinct data)</code>. If sorted data is needed, external sort is necessary. <code>lower-bound</code> and <code>upper-bound</code> are not defined though.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb421"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> cat-distr </span>(r/distribution <span class="at">:categorical-distribution</span> {<span class="at">:data</span> (<span class="kw">repeatedly</span> <span class="dv">100</span> #(<span class="kw">rand-nth</span> [<span class="at">:a</span> <span class="at">:b</span> <span class="va">nil</span> <span class="st">"s"</span>]))}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb422"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true" tabindex="-1"></a>(r/sample cat-distr) <span class="co">;; =&gt; :a</span></span>
<span id="cb422-2"><a href="#cb422-2" aria-hidden="true" tabindex="-1"></a>(r/sample cat-distr) <span class="co">;; =&gt; :a</span></span>
<span id="cb422-3"><a href="#cb422-3" aria-hidden="true" tabindex="-1"></a>(r/pdf cat-distr <span class="va">nil</span>) <span class="co">;; =&gt; 0.26000000000000006</span></span>
<span id="cb422-4"><a href="#cb422-4" aria-hidden="true" tabindex="-1"></a>(r/pdf cat-distr <span class="st">"ss"</span>) <span class="co">;; =&gt; 0.0</span></span>
<span id="cb422-5"><a href="#cb422-5" aria-hidden="true" tabindex="-1"></a>(r/cdf cat-distr <span class="at">:b</span>) <span class="co">;; =&gt; 0.7300000000000002</span></span>
<span id="cb422-6"><a href="#cb422-6" aria-hidden="true" tabindex="-1"></a>(<span class="kw">map</span> (<span class="kw">partial</span> r/icdf cat-distr) [<span class="fl">1.0E-4</span> <span class="fl">0.5</span> <span class="fl">0.9999</span>]) <span class="co">;; =&gt; (:a nil "s")</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
</section>
<section id="sequences" class="level2">
<h2 class="anchored" data-anchor-id="sequences">Sequences</h2>
<p>Related functions:</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>sequence-generator</code>, <code>jittered-sequence-generator</code></li>
</ul>
</div>
</div>
<p>Sequence generators can create random or quasi random vector with certain property like low discrepancy or from ball/sphere.</p>
<p>There are two multimethods:</p>
<ol type="1">
<li><code>sequence-generator</code>, returns lazy sequence of generated vectors (for dim&gt;1) or primitives (for dim=1)</li>
<li><code>jittered-sequence-generator</code>, returns lazy sequence like above and also add jittering, works only for low discrepancy sequences.</li>
</ol>
<p>Parameters:</p>
<ul>
<li><code>seq-generator</code> - generator name</li>
<li><code>dimensions</code> - vector dimensionality, 1 for primitive</li>
<li><code>jitter</code> - only for jittered sequences, from 0.0 to 1.0, default 0.25</li>
</ul>
<p>For given dimensionality, returns sequence of:</p>
<ul>
<li>1 - doubles</li>
<li>2 - <code>Vec2</code> type</li>
<li>3 - <code>Vec3</code> type</li>
<li>4 - <code>Vec4</code> type</li>
<li>n&gt;4 - Clojure vector</li>
</ul>
<p><code>Vec2</code>, <code>Vec3</code> and <code>Vec4</code> are fixed size vectors optimized for speed. They act exactly like 2,3 and 4 elements Clojure vectors</p>
<section id="low-discrepancy" class="level3">
<h3 class="anchored" data-anchor-id="low-discrepancy">Low discrepancy</h3>
<p>There are 3 types of sequences:</p>
<ul>
<li><code>:sobol</code> - up to 1000 dimensions, <a href="https://en.wikipedia.org/wiki/Sobol_sequence">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/random/SobolSequenceGenerator.html">source</a></li>
<li><code>:halton</code> - up to 40 dimensions, <a href="https://en.wikipedia.org/wiki/Halton_sequence">wiki</a>, <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/random/HaltonSequenceGenerator.html">source</a></li>
<li><code>:r2</code> - up to 15 dimensions, <a href="http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/">info</a></li>
</ul>
<p>1000 samples from each of the sequence type without and with jittering</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td>:sobol</td>
<td>:halton</td>
<td>:r2</td>
</tr>
<tr class="even">
<td><img src="random_files/511.png" class="clay-image img-fluid"></td>
<td><img src="random_files/512.png" class="clay-image img-fluid"></td>
<td><img src="random_files/513.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td>:sobol (jittered)</td>
<td>:halton (jittered)</td>
<td>:r2 (jittered)</td>
</tr>
<tr class="even">
<td><img src="random_files/514.png" class="clay-image img-fluid"></td>
<td><img src="random_files/515.png" class="clay-image img-fluid"></td>
<td><img src="random_files/516.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb423"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:sobol</span> <span class="dv">4</span>)) <span class="co">;; =&gt; #vec4 [0.0, 0.0, 0.0, 0.0]</span></span>
<span id="cb423-2"><a href="#cb423-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/jittered-sequence-generator <span class="at">:sobol</span> <span class="dv">4</span>)) <span class="co">;; =&gt; #vec4 [0.02900236218752402, 0.03321895859029258, 0.03343024406202439, 0.01735820373097604]</span></span>
<span id="cb423-3"><a href="#cb423-3" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:halton</span> <span class="dv">3</span>)) <span class="co">;; =&gt; #vec3 [0.0, 0.0, 0.0]</span></span>
<span id="cb423-4"><a href="#cb423-4" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/jittered-sequence-generator <span class="at">:halton</span> <span class="dv">3</span>)) <span class="co">;; =&gt; #vec3 [0.00988332128494876, 0.163602670427742, 0.09647432740056015]</span></span>
<span id="cb423-5"><a href="#cb423-5" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:r2</span> <span class="dv">2</span>)) <span class="co">;; =&gt; #vec2 [0.2548776662466927, 0.06984029099805333]</span></span>
<span id="cb423-6"><a href="#cb423-6" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/jittered-sequence-generator <span class="at">:r2</span> <span class="dv">2</span>)) <span class="co">;; =&gt; #vec2 [0.29704197409033695, 0.07653356059721561]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>15 dimensional sequence</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb424"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">2</span> (r/sequence-generator <span class="at">:r2</span> <span class="dv">15</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb425"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true" tabindex="-1"></a>([<span class="fl">0.45625055763798894</span></span>
<span id="cb425-2"><a href="#cb425-2" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.4144151289829652</span></span>
<span id="cb425-3"><a href="#cb425-3" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.37440997700257395</span></span>
<span id="cb425-4"><a href="#cb425-4" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.33615502811293263</span></span>
<span id="cb425-5"><a href="#cb425-5" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.2995737119048001</span></span>
<span id="cb425-6"><a href="#cb425-6" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.26459280788164197</span></span>
<span id="cb425-7"><a href="#cb425-7" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.231142298902816</span></span>
<span id="cb425-8"><a href="#cb425-8" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.19915523103853916</span></span>
<span id="cb425-9"><a href="#cb425-9" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.16856757955612012</span></span>
<span id="cb425-10"><a href="#cb425-10" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.13931812076922045</span></span>
<span id="cb425-11"><a href="#cb425-11" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.11134830949363828</span></span>
<span id="cb425-12"><a href="#cb425-12" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.08460216186433356</span></span>
<span id="cb425-13"><a href="#cb425-13" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.05902614327914302</span></span>
<span id="cb425-14"><a href="#cb425-14" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.03456906124489478</span></span>
<span id="cb425-15"><a href="#cb425-15" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.01118196291144713</span>]</span>
<span id="cb425-16"><a href="#cb425-16" aria-hidden="true" tabindex="-1"></a> [<span class="fl">0.4125011152759779</span></span>
<span id="cb425-17"><a href="#cb425-17" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.32883025796593035</span></span>
<span id="cb425-18"><a href="#cb425-18" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.2488199540051479</span></span>
<span id="cb425-19"><a href="#cb425-19" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.17231005622586526</span></span>
<span id="cb425-20"><a href="#cb425-20" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.09914742380960018</span></span>
<span id="cb425-21"><a href="#cb425-21" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.029185615763283934</span></span>
<span id="cb425-22"><a href="#cb425-22" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.962284597805632</span></span>
<span id="cb425-23"><a href="#cb425-23" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.8983104620770783</span></span>
<span id="cb425-24"><a href="#cb425-24" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.8371351591122402</span></span>
<span id="cb425-25"><a href="#cb425-25" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.7786362415384409</span></span>
<span id="cb425-26"><a href="#cb425-26" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.7226966189872766</span></span>
<span id="cb425-27"><a href="#cb425-27" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.6692043237286671</span></span>
<span id="cb425-28"><a href="#cb425-28" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.6180522865582859</span></span>
<span id="cb425-29"><a href="#cb425-29" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.5691381224897896</span></span>
<span id="cb425-30"><a href="#cb425-30" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.5223639258228941</span>])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>One dimensional sequence is just a sequence of numbers</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb426"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">20</span> (r/sequence-generator <span class="at">:sobol</span> <span class="dv">1</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb427"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true" tabindex="-1"></a>(<span class="fl">0.0</span></span>
<span id="cb427-2"><a href="#cb427-2" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.5</span></span>
<span id="cb427-3"><a href="#cb427-3" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.75</span></span>
<span id="cb427-4"><a href="#cb427-4" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.25</span></span>
<span id="cb427-5"><a href="#cb427-5" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.375</span></span>
<span id="cb427-6"><a href="#cb427-6" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.875</span></span>
<span id="cb427-7"><a href="#cb427-7" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.625</span></span>
<span id="cb427-8"><a href="#cb427-8" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.125</span></span>
<span id="cb427-9"><a href="#cb427-9" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.1875</span></span>
<span id="cb427-10"><a href="#cb427-10" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.6875</span></span>
<span id="cb427-11"><a href="#cb427-11" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.9375</span></span>
<span id="cb427-12"><a href="#cb427-12" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.4375</span></span>
<span id="cb427-13"><a href="#cb427-13" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.3125</span></span>
<span id="cb427-14"><a href="#cb427-14" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.8125</span></span>
<span id="cb427-15"><a href="#cb427-15" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.5625</span></span>
<span id="cb427-16"><a href="#cb427-16" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.0625</span></span>
<span id="cb427-17"><a href="#cb427-17" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.09375</span></span>
<span id="cb427-18"><a href="#cb427-18" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.59375</span></span>
<span id="cb427-19"><a href="#cb427-19" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.84375</span></span>
<span id="cb427-20"><a href="#cb427-20" aria-hidden="true" tabindex="-1"></a> <span class="fl">0.34375</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
<section id="sphere-and-ball" class="level3">
<h3 class="anchored" data-anchor-id="sphere-and-ball">Sphere and ball</h3>
<p>Unit sphere or unit ball sequences can generate any dimension.</p>
<ul>
<li><code>:sphere</code> - <a href="https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/random/UnitSphereRandomVectorGenerator.html">source</a></li>
<li><code>:ball</code> - dropped coordinates, <a href="http://extremelearning.com.au/how-to-generate-uniformly-random-points-on-n-spheres-and-n-balls">info</a></li>
</ul>
<p>500 samples</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:sphere</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:ball</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/517.png" class="clay-image img-fluid"></td>
<td><img src="random_files/518.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb430"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:sphere</span> <span class="dv">4</span>)) <span class="co">;; =&gt; #vec4 [0.5424071626927469, -0.013215716352763234, 0.5218247299811954, -0.6582695237370022]</span></span>
<span id="cb430-2"><a href="#cb430-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:ball</span> <span class="dv">3</span>)) <span class="co">;; =&gt; #vec3 [0.6106439662537149, -0.19719273807051046, -0.5338472481721354]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>20 dimensional sequence</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb431"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">take</span> <span class="dv">2</span> (r/sequence-generator <span class="at">:sphere</span> <span class="dv">20</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb432"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true" tabindex="-1"></a>([<span class="fl">0.10024683329984485</span></span>
<span id="cb432-2"><a href="#cb432-2" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.20569256502013525</span></span>
<span id="cb432-3"><a href="#cb432-3" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.1555156469751135</span></span>
<span id="cb432-4"><a href="#cb432-4" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.08849454905252081</span></span>
<span id="cb432-5"><a href="#cb432-5" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.05193412141920333</span></span>
<span id="cb432-6"><a href="#cb432-6" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.21233505262887162</span></span>
<span id="cb432-7"><a href="#cb432-7" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.028799574279578778</span></span>
<span id="cb432-8"><a href="#cb432-8" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.3737695356904468</span></span>
<span id="cb432-9"><a href="#cb432-9" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.42139770901601514</span></span>
<span id="cb432-10"><a href="#cb432-10" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.02023096283083862</span></span>
<span id="cb432-11"><a href="#cb432-11" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.28783014581865857</span></span>
<span id="cb432-12"><a href="#cb432-12" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.13014382596383356</span></span>
<span id="cb432-13"><a href="#cb432-13" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.07330739388864924</span></span>
<span id="cb432-14"><a href="#cb432-14" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.06307011647698783</span></span>
<span id="cb432-15"><a href="#cb432-15" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.5357026929766503</span></span>
<span id="cb432-16"><a href="#cb432-16" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.22318517473179134</span></span>
<span id="cb432-17"><a href="#cb432-17" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.13743212701688884</span></span>
<span id="cb432-18"><a href="#cb432-18" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.04478660464216732</span></span>
<span id="cb432-19"><a href="#cb432-19" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.058137418049075795</span></span>
<span id="cb432-20"><a href="#cb432-20" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.28129202151665705</span>]</span>
<span id="cb432-21"><a href="#cb432-21" aria-hidden="true" tabindex="-1"></a> [-<span class="fl">0.15809154310731693</span></span>
<span id="cb432-22"><a href="#cb432-22" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.06681106666069823</span></span>
<span id="cb432-23"><a href="#cb432-23" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.03215728545808086</span></span>
<span id="cb432-24"><a href="#cb432-24" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.2857466810468637</span></span>
<span id="cb432-25"><a href="#cb432-25" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.10136661773650886</span></span>
<span id="cb432-26"><a href="#cb432-26" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.026818530655654954</span></span>
<span id="cb432-27"><a href="#cb432-27" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.0857147667444245</span></span>
<span id="cb432-28"><a href="#cb432-28" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.36143042325270464</span></span>
<span id="cb432-29"><a href="#cb432-29" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.10584619322452117</span></span>
<span id="cb432-30"><a href="#cb432-30" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.44804400894277396</span></span>
<span id="cb432-31"><a href="#cb432-31" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.3384606363076276</span></span>
<span id="cb432-32"><a href="#cb432-32" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.14850501620955514</span></span>
<span id="cb432-33"><a href="#cb432-33" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.5199775265327915</span></span>
<span id="cb432-34"><a href="#cb432-34" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.16910060380195113</span></span>
<span id="cb432-35"><a href="#cb432-35" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.060739675348048916</span></span>
<span id="cb432-36"><a href="#cb432-36" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.031579757371335546</span></span>
<span id="cb432-37"><a href="#cb432-37" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.14706770833941443</span></span>
<span id="cb432-38"><a href="#cb432-38" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.01162580441478035</span></span>
<span id="cb432-39"><a href="#cb432-39" aria-hidden="true" tabindex="-1"></a>  <span class="fl">0.05066166738739591</span></span>
<span id="cb432-40"><a href="#cb432-40" aria-hidden="true" tabindex="-1"></a>  -<span class="fl">0.24967897944279724</span>])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
<section id="uniform-and-gaussian" class="level3">
<h3 class="anchored" data-anchor-id="uniform-and-gaussian">Uniform and Gaussian</h3>
<p>Additionally uniform and gaussian N(0,1) sequences can generate any number of dimensions. They rely on <code>default-rng</code></p>
<ul>
<li><code>:default</code> - uniform distribution U(0,1)</li>
<li><code>:gaussian</code> - gaussian, normal distribution, N(0,1) for each dimension</li>
</ul>
<p>1000 samples</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:default</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:gaussian</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/519.png" class="clay-image img-fluid"></td>
<td><img src="random_files/520.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb435"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:default</span> <span class="dv">4</span>)) <span class="co">;; =&gt; #vec4 [0.47512411831706514, 0.9192840007208322, 0.8915903760933624, 0.5999298799277241]</span></span>
<span id="cb435-2"><a href="#cb435-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">first</span> (r/sequence-generator <span class="at">:gaussian</span> <span class="dv">3</span>)) <span class="co">;; =&gt; #vec3 [-0.5036463956341344, -0.32895615013785706, 0.4149779826362254]</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="noise" class="level2">
<h2 class="anchored" data-anchor-id="noise">Noise</h2>
<p>Value, gradient and simplex noises plus various combinations. 1d ,2d and 3d versions are prepared.</p>
<p>Related functions:</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Defined functions">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Defined functions
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><code>single-noise</code>, <code>fbm-noise</code>, <code>billow-noise</code>, <code>ridgemulti-noise</code></li>
<li><code>vnoise</code>, <code>noise</code>, <code>simplex</code></li>
<li><code>random-noise-cfg</code>, <code>random-noise-fn</code></li>
<li><code>discrete-noise</code></li>
</ul>
</div>
</div>
<section id="generation" class="level3">
<h3 class="anchored" data-anchor-id="generation">Generation</h3>
<p>There are four main methods of noise creation:</p>
<ul>
<li><code>single-noise</code>, single frequency (octave) noise</li>
<li><code>fbm-noise</code>, multi frequency (octaves), fractal brownian motion *.<code>billow-noise</code>, multi frequency, “billowy” noise</li>
<li><code>ridgemulti-noise</code>, multi frequency, ridged multi-fractal</li>
</ul>
<p>Each noise can be configured in, here is the list of options:</p>
<ul>
<li><code>:seed</code> - seed for noise randomness</li>
<li><code>:noise-type</code>
<ul>
<li><code>:value</code> - value noise</li>
<li><code>:gradient</code> (default) - gradient noise (Perlin)</li>
<li><code>:simplex</code> - OpenSimplex noise</li>
</ul></li>
<li><code>:interpolation</code> - interpolation between knots, only for value and gradient noise
<ul>
<li><code>:none</code></li>
<li><code>:linear</code></li>
<li><code>:hermite</code> (default)</li>
<li><code>:quintic</code></li>
</ul></li>
<li><code>:octaves</code> (default: 6) - number of frequencies/octaves for multi frequency creators</li>
<li><code>:lacunarity</code> (default: 2) - noise length (1/frequency) for each octave</li>
<li><code>:gain</code> (default: 0.5) - amplitude factor for each octave</li>
<li><code>:normalize?</code> (default: true) - if true, range is <code>[0,1]</code>, <code>[-1,1]</code> otherwise.</li>
</ul>
<p><a href="http://www.campi3d.com/External/MariExtensionPack/userGuide5R4v1/Understandingsomebasicnoiseterms.html">more info</a> about octaves, gain and lacunarity.</p>
<section id="single" class="level4">
<h4 class="anchored" data-anchor-id="single">Single</h4>
<div class="sourceClojure">
<div class="sourceCode" id="cb436"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> single-g-noise </span>(r/single-noise {<span class="at">:noise-type</span> <span class="at">:gradient</span> <span class="at">:seed</span> <span class="dv">1</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb437"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true" tabindex="-1"></a>(single-g-noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.23759999999999998</span></span>
<span id="cb437-2"><a href="#cb437-2" aria-hidden="true" tabindex="-1"></a>(single-g-noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.48526400000000003</span></span>
<span id="cb437-3"><a href="#cb437-3" aria-hidden="true" tabindex="-1"></a>(single-g-noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.660938496</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>Single octave of simplex noise:</p>
<div class="clay-image">
<img class="clay-image" src="random_files/521.png">
</div>
<p>Value and gradient single noise for different interpolations</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
</colgroup>
<tbody>
<tr class="odd">
<td></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:none</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:linear</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hermite</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:quintic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td>value</td>
<td><img src="random_files/522.png" class="clay-image img-fluid"></td>
<td><img src="random_files/523.png" class="clay-image img-fluid"></td>
<td><img src="random_files/524.png" class="clay-image img-fluid"></td>
<td><img src="random_files/525.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td>gradient</td>
<td><img src="random_files/526.png" class="clay-image img-fluid"></td>
<td><img src="random_files/527.png" class="clay-image img-fluid"></td>
<td><img src="random_files/528.png" class="clay-image img-fluid"></td>
<td><img src="random_files/529.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="fbm" class="level4">
<h4 class="anchored" data-anchor-id="fbm">FBM</h4>
<div class="sourceClojure">
<div class="sourceCode" id="cb442"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> fbm-noise </span>(r/fbm-noise {<span class="at">:noise-type</span> <span class="at">:gradient</span> <span class="at">:octaves</span> <span class="dv">3</span> <span class="at">:seed</span> <span class="dv">1</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb443"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true" tabindex="-1"></a>(fbm-noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.7029714285714286</span></span>
<span id="cb443-2"><a href="#cb443-2" aria-hidden="true" tabindex="-1"></a>(fbm-noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.44446811428571426</span></span>
<span id="cb443-3"><a href="#cb443-3" aria-hidden="true" tabindex="-1"></a>(fbm-noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.54825344</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<p>6 octave of simplex noise:</p>
<div class="clay-image">
<img class="clay-image" src="random_files/530.png">
</div>
<p>Value and gradient FBM noise for different interpolations</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:none</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:linear</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:hermite</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>:quintic</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td>value</td>
<td><img src="random_files/531.png" class="clay-image img-fluid"></td>
<td><img src="random_files/532.png" class="clay-image img-fluid"></td>
<td><img src="random_files/533.png" class="clay-image img-fluid"></td>
<td><img src="random_files/534.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td>gradient</td>
<td><img src="random_files/535.png" class="clay-image img-fluid"></td>
<td><img src="random_files/536.png" class="clay-image img-fluid"></td>
<td><img src="random_files/537.png" class="clay-image img-fluid"></td>
<td><img src="random_files/538.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>Different number of octaves for FBM gradient noise</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td>octaves=2</td>
<td>octaves=4</td>
<td>octaves=6</td>
<td>octaves=8</td>
</tr>
<tr class="even">
<td><img src="random_files/539.png" class="clay-image img-fluid"></td>
<td><img src="random_files/540.png" class="clay-image img-fluid"></td>
<td><img src="random_files/541.png" class="clay-image img-fluid"></td>
<td><img src="random_files/542.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>Different gains and lacunarities for FBM gradient noise</p>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td></td>
<td>lacunarity=0.5</td>
<td>lacunarity=2</td>
<td>lacunarity=5</td>
<td>lacunarity=8</td>
</tr>
<tr class="even">
<td>gain=0.25</td>
<td><img src="random_files/543.png" class="clay-image img-fluid"></td>
<td><img src="random_files/544.png" class="clay-image img-fluid"></td>
<td><img src="random_files/545.png" class="clay-image img-fluid"></td>
<td><img src="random_files/546.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td>gain=0.5</td>
<td><img src="random_files/547.png" class="clay-image img-fluid"></td>
<td><img src="random_files/548.png" class="clay-image img-fluid"></td>
<td><img src="random_files/549.png" class="clay-image img-fluid"></td>
<td><img src="random_files/550.png" class="clay-image img-fluid"></td>
</tr>
<tr class="even">
<td>gain=0.75</td>
<td><img src="random_files/551.png" class="clay-image img-fluid"></td>
<td><img src="random_files/552.png" class="clay-image img-fluid"></td>
<td><img src="random_files/553.png" class="clay-image img-fluid"></td>
<td><img src="random_files/554.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="billow" class="level4">
<h4 class="anchored" data-anchor-id="billow">Billow</h4>
<div class="sourceClojure">
<div class="sourceCode" id="cb449"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> billow-noise </span>(r/billow-noise {<span class="at">:seed</span> <span class="dv">1</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-image">
<img class="clay-image" src="random_files/555.png">
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td>simplex noise</td>
<td>value noise</td>
<td>gradient noise, 1 octave</td>
</tr>
<tr class="even">
<td><img src="random_files/556.png" class="clay-image img-fluid"></td>
<td><img src="random_files/557.png" class="clay-image img-fluid"></td>
<td><img src="random_files/558.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb450"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true" tabindex="-1"></a>(billow-noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.3879619047619048</span></span>
<span id="cb450-2"><a href="#cb450-2" aria-hidden="true" tabindex="-1"></a>(billow-noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.1804361142857142</span></span>
<span id="cb450-3"><a href="#cb450-3" aria-hidden="true" tabindex="-1"></a>(billow-noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.11801290199365083</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="ridged-multi" class="level4">
<h4 class="anchored" data-anchor-id="ridged-multi">Ridged Multi</h4>
<div class="sourceClojure">
<div class="sourceCode" id="cb451"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> ridgedmulti-noise </span>(r/ridgedmulti-noise {<span class="at">:seed</span> <span class="dv">1</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-image">
<img class="clay-image" src="random_files/559.png">
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td>simplex noise</td>
<td>value noise</td>
<td>gradient noise, 1 octave</td>
</tr>
<tr class="even">
<td><img src="random_files/560.png" class="clay-image img-fluid"></td>
<td><img src="random_files/561.png" class="clay-image img-fluid"></td>
<td><img src="random_files/562.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb452"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true" tabindex="-1"></a>(ridgedmulti-noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.33387061650044203</span></span>
<span id="cb452-2"><a href="#cb452-2" aria-hidden="true" tabindex="-1"></a>(ridgedmulti-noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.6479155481384621</span></span>
<span id="cb452-3"><a href="#cb452-3" aria-hidden="true" tabindex="-1"></a>(ridgedmulti-noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.786227445531883</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="predefined" class="level3">
<h3 class="anchored" data-anchor-id="predefined">Predefined</h3>
<p>There are three ready to use preconfigured noises:</p>
<ul>
<li><code>vnoise</code>, FBM value noise, 6 octaves, hermite interpolation</li>
<li><code>noise</code>, Perlin noise, FBM gradient noise, 6 octaves, quintic interpolation</li>
<li><code>simplex</code>, FBM simplex noise, 6 octaves</li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<tbody>
<tr class="odd">
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>vnoise</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>noise</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>simplex</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td><img src="random_files/563.png" class="clay-image img-fluid"></td>
<td><img src="random_files/564.png" class="clay-image img-fluid"></td>
<td><img src="random_files/565.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb456"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true" tabindex="-1"></a>(r/vnoise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.8680365040559659</span></span>
<span id="cb456-2"><a href="#cb456-2" aria-hidden="true" tabindex="-1"></a>(r/vnoise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.39391987601041634</span></span>
<span id="cb456-3"><a href="#cb456-3" aria-hidden="true" tabindex="-1"></a>(r/vnoise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.4321409936990729</span></span>
<span id="cb456-4"><a href="#cb456-4" aria-hidden="true" tabindex="-1"></a>(r/noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.5958232380952381</span></span>
<span id="cb456-5"><a href="#cb456-5" aria-hidden="true" tabindex="-1"></a>(r/noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.5299592070095238</span></span>
<span id="cb456-6"><a href="#cb456-6" aria-hidden="true" tabindex="-1"></a>(r/noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.5091397603804436</span></span>
<span id="cb456-7"><a href="#cb456-7" aria-hidden="true" tabindex="-1"></a>(r/simplex <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.46860690115047615</span></span>
<span id="cb456-8"><a href="#cb456-8" aria-hidden="true" tabindex="-1"></a>(r/simplex <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.4109928995112519</span></span>
<span id="cb456-9"><a href="#cb456-9" aria-hidden="true" tabindex="-1"></a>(r/simplex <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.5386107648677247</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
<section id="warping" class="level3">
<h3 class="anchored" data-anchor-id="warping">Warping</h3>
<p>Warp noise <a href="http://www.iquilezles.org/www/articles/warp/warp.htm">info</a></p>
<p><code>warp-noise-fn</code>, create warp noise.</p>
<p>Default parameters:</p>
<p>Parameters:</p>
<ul>
<li><code>noise</code> function, default: <code>vnoise</code></li>
<li><code>scale</code> factor, default: 4.0</li>
<li><code>depth</code> (1 or 2), default 1</li>
</ul>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
</colgroup>
<tbody>
<tr class="odd">
<td></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>vnoise</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>noise</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
<td><div>
<pre class="sourceCode language-clojure source-clojure bg-light code-with-copy"><code>simplex</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre>
</div></td>
</tr>
<tr class="even">
<td>scale=2</td>
<td><img src="random_files/566.png" class="clay-image img-fluid"></td>
<td><img src="random_files/567.png" class="clay-image img-fluid"></td>
<td><img src="random_files/568.png" class="clay-image img-fluid"></td>
</tr>
<tr class="odd">
<td>scale=4</td>
<td><img src="random_files/569.png" class="clay-image img-fluid"></td>
<td><img src="random_files/570.png" class="clay-image img-fluid"></td>
<td><img src="random_files/571.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="random-configuration" class="level3">
<h3 class="anchored" data-anchor-id="random-configuration">Random configuration</h3>
<p>For generative art purposes it’s good to generate random configuration and noise based on it.</p>
<ul>
<li><code>random-noise-cfg</code>, create random configuration</li>
<li><code>random-noise-fn</code>, create random noise from random configuration</li>
</ul>
<p>Optional parameter is a map with values user wants to fix.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb460"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true" tabindex="-1"></a>(r/random-noise-cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb461"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true" tabindex="-1"></a>{<span class="at">:interpolation</span> <span class="at">:hermite</span>,</span>
<span id="cb461-2"><a href="#cb461-2" aria-hidden="true" tabindex="-1"></a> <span class="at">:warp-scale</span> <span class="fl">0.0</span>,</span>
<span id="cb461-3"><a href="#cb461-3" aria-hidden="true" tabindex="-1"></a> <span class="at">:seed</span> <span class="dv">665844940</span>,</span>
<span id="cb461-4"><a href="#cb461-4" aria-hidden="true" tabindex="-1"></a> <span class="at">:normalize</span>? <span class="va">true</span>,</span>
<span id="cb461-5"><a href="#cb461-5" aria-hidden="true" tabindex="-1"></a> <span class="at">:noise-type</span> <span class="at">:gradient</span>,</span>
<span id="cb461-6"><a href="#cb461-6" aria-hidden="true" tabindex="-1"></a> <span class="at">:lacunarity</span> <span class="fl">1.90872786462909</span>,</span>
<span id="cb461-7"><a href="#cb461-7" aria-hidden="true" tabindex="-1"></a> <span class="at">:gain</span> <span class="fl">0.24908653479282347</span>,</span>
<span id="cb461-8"><a href="#cb461-8" aria-hidden="true" tabindex="-1"></a> <span class="at">:generator</span> <span class="at">:fbm</span>,</span>
<span id="cb461-9"><a href="#cb461-9" aria-hidden="true" tabindex="-1"></a> <span class="at">:warp-depth</span> <span class="dv">1</span>,</span>
<span id="cb461-10"><a href="#cb461-10" aria-hidden="true" tabindex="-1"></a> <span class="at">:octaves</span> <span class="dv">6</span>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb462"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true" tabindex="-1"></a>(r/random-noise-cfg {<span class="at">:seed</span> <span class="dv">1</span>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb463"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true" tabindex="-1"></a>{<span class="at">:interpolation</span> <span class="at">:hermite</span>,</span>
<span id="cb463-2"><a href="#cb463-2" aria-hidden="true" tabindex="-1"></a> <span class="at">:warp-scale</span> <span class="fl">4.0</span>,</span>
<span id="cb463-3"><a href="#cb463-3" aria-hidden="true" tabindex="-1"></a> <span class="at">:seed</span> <span class="dv">1</span>,</span>
<span id="cb463-4"><a href="#cb463-4" aria-hidden="true" tabindex="-1"></a> <span class="at">:normalize</span>? <span class="va">true</span>,</span>
<span id="cb463-5"><a href="#cb463-5" aria-hidden="true" tabindex="-1"></a> <span class="at">:noise-type</span> <span class="at">:value</span>,</span>
<span id="cb463-6"><a href="#cb463-6" aria-hidden="true" tabindex="-1"></a> <span class="at">:lacunarity</span> <span class="fl">1.8874943472437105</span>,</span>
<span id="cb463-7"><a href="#cb463-7" aria-hidden="true" tabindex="-1"></a> <span class="at">:gain</span> <span class="fl">0.508204375355278</span>,</span>
<span id="cb463-8"><a href="#cb463-8" aria-hidden="true" tabindex="-1"></a> <span class="at">:generator</span> <span class="at">:fbm</span>,</span>
<span id="cb463-9"><a href="#cb463-9" aria-hidden="true" tabindex="-1"></a> <span class="at">:warp-depth</span> <span class="dv">1</span>,</span>
<span id="cb463-10"><a href="#cb463-10" aria-hidden="true" tabindex="-1"></a> <span class="at">:octaves</span> <span class="dv">3</span>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="sourceClojure">
<div class="sourceCode" id="cb464"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">def</span><span class="fu"> some-random-noise </span>(r/random-noise-fn {<span class="at">:seed</span> <span class="dv">1</span>}))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="clay-image">
<img class="clay-image" src="random_files/572.png">
</div>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb465"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true" tabindex="-1"></a>(some-random-noise <span class="fl">0.2</span>) <span class="co">;; =&gt; 0.32429267456</span></span>
<span id="cb465-2"><a href="#cb465-2" aria-hidden="true" tabindex="-1"></a>(some-random-noise <span class="fl">0.2</span> <span class="fl">0.3</span>) <span class="co">;; =&gt; 0.5494103911850483</span></span>
<span id="cb465-3"><a href="#cb465-3" aria-hidden="true" tabindex="-1"></a>(some-random-noise <span class="fl">0.2</span> <span class="fl">0.3</span> <span class="fl">0.4</span>) <span class="co">;; =&gt; 0.7304322506666667</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
<div class="clay-table">
<div>
<div class="table-responsive">
<table class="table table-hover clay-table" data-quarto-postprocess="true">
<tbody>
<tr class="odd">
<td><img src="random_files/573.png" class="clay-image img-fluid"></td>
<td><img src="random_files/574.png" class="clay-image img-fluid"></td>
<td><img src="random_files/575.png" class="clay-image img-fluid"></td>
</tr>
<tr class="even">
<td><img src="random_files/576.png" class="clay-image img-fluid"></td>
<td><img src="random_files/577.png" class="clay-image img-fluid"></td>
<td><img src="random_files/578.png" class="clay-image img-fluid"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="discrete-noise" class="level3">
<h3 class="anchored" data-anchor-id="discrete-noise">Discrete noise</h3>
<p><code>discrete-noise</code> is a 1d or 2d hashing function which hashes long or two longs and converts it to a double from <code>[0,1]</code> range.</p>
<div class="callout callout-style-default callout-note callout-titled" title="Examples">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Examples
</div>
</div>
<div class="callout-body-container callout-body">
<div class="sourceClojure">
<div class="sourceCode" id="cb466"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true" tabindex="-1"></a>(r/discrete-noise <span class="dv">100</span>) <span class="co">;; =&gt; 0.07493987729537295</span></span>
<span id="cb466-2"><a href="#cb466-2" aria-hidden="true" tabindex="-1"></a>(r/discrete-noise <span class="dv">101</span>) <span class="co">;; =&gt; 0.9625321542669703</span></span>
<span id="cb466-3"><a href="#cb466-3" aria-hidden="true" tabindex="-1"></a>(r/discrete-noise <span class="dv">200</span> <span class="dv">100</span>) <span class="co">;; =&gt; 0.6713155553076955</span></span>
<span id="cb466-4"><a href="#cb466-4" aria-hidden="true" tabindex="-1"></a>(r/discrete-noise <span class="dv">200</span> <span class="dv">101</span>) <span class="co">;; =&gt; 0.22706653793671472</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</div>
</section>
</section>
<section id="reference" class="level2">
<h2 class="anchored" data-anchor-id="reference">Reference</h2>
<section id="fastmath.random" class="level3">
<h3 class="anchored" data-anchor-id="fastmath.random">fastmath.random</h3>
<p>Various random and noise functions.</p>
<p>Namespace defines various random number generators (RNGs), different types of random functions, sequence generators and noise functions.</p>
<p>### RNGs</p>
<p>You can use a selection of various RNGs defined in <a href="http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/random/package-summary.html">Apache Commons Math</a> library.</p>
<p>Currently supported RNGs:</p>
<ul>
<li><code>:jdk</code> - default java.util.Random</li>
<li><code>:mersenne</code> - MersenneTwister</li>
<li><code>:isaac</code> - ISAAC</li>
<li><code>:well512a</code>, <code>:well1024a</code>, <code>:well19937a</code>, <code>:well19937c</code>, <code>:well44497a</code>, <code>:well44497b</code> - several WELL variants</li>
</ul>
<p>To create your RNG use <a href="#LOS-rng">rng</a> multimethod. Pass RNG name and (optional) seed. Returned RNG is equipped with <a href="#LOS-RNGProto">RNGProto</a> protocol with methods: <a href="#LOS-irandom">irandom</a>, <a href="#LOS-lrandom">lrandom</a>, <a href="#LOS-frandom">frandom</a> <a href="#LOS-drandom">drandom</a>, <a href="#LOS-grandom">grandom</a>, <a href="#LOS-brandom">brandom</a> which return random primitive value with given RNG.</p>
<pre><code>(let [rng (rng :isaac 1337)]
  (irandom rng))</code></pre>
<p>For conveniency default RNG (<code>:jdk</code>) with following functions are created: <a href="#LOS-irand">irand</a>, <a href="#LOS-lrand">lrand</a>, <a href="#LOS-frand">frand</a>, <a href="#LOS-drand">drand</a>, <a href="#LOS-grand">grand</a>, <a href="#LOS-brand">brand</a>.</p>
<p>Each prefix denotes returned type:</p>
<ul>
<li>i - int</li>
<li>l - long</li>
<li>f - float</li>
<li>d - double</li>
<li>g - gaussian (double)</li>
<li>b - boolean</li>
</ul>
<p>Check individual function for parameters description.</p>
<p>### Random Vector Sequences</p>
<p>Couple of functions to generate sequences of numbers or vectors.</p>
<p>To create generator call <a href="#LOS-sequence-generator">sequence-generator</a> with generator name and vector size. Following generators are available:</p>
<ul>
<li><code>:halton</code> - Halton low-discrepancy sequence; range [0,1]</li>
<li><code>:sobol</code> - Sobol low-discrepancy sequence; range [0,1]</li>
<li><code>:r2</code> - R2 low-discrepancy sequence; range [0,1], <a href="http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/">more…</a></li>
<li><code>:sphere</code> - uniformly random distributed on unit sphere</li>
<li><code>:ball</code> - uniformly random distributed from unit ball</li>
<li><code>:gaussian</code> - gaussian distributed (mean=0, stddev=1)</li>
<li><code>:default</code> - uniformly random; range:[0,1]</li>
</ul>
<p><code>:halton</code>, <code>:sobol</code> and <code>:r2</code> can be also randomly jittered according to this <a href="http://extremelearning.com.au/a-simple-method-to-construct-isotropic-quasirandom-blue-noise-point-sequences/">article</a>. Call <a href="#LOS-jittered-sequence-generator">jittered-sequence-generator</a>.</p>
<p>After creation you get lazy sequence</p>
<p>### Noise</p>
<p>List of continuous noise functions (1d, 2d and 3d):</p>
<ul>
<li><code>:value</code> - value noise</li>
<li><code>:gradient</code> - gradient noise (improved Ken Perlin version)</li>
<li><code>:simplex</code> - simplex noise</li>
</ul>
<p>First two (<code>:value</code> and <code>:gradient</code>) can use 4 different interpolation types: <code>:none</code>, <code>:linear</code>, <code>:hermite</code> (cubic) and <code>:quintic</code>.</p>
<p>All can be combined in following variants:</p>
<ul>
<li>Noise - pure noise value, create with <a href="#LOS-single-noise">single-noise</a></li>
<li>FBM - fractal brownian motion, create with <a href="#LOS-fbm-noise">fbm-noise</a></li>
<li>Billow - billow noise, <a href="#LOS-billow-noise">billow-noise</a></li>
<li>RidgedMulti - ridged multi, <a href="#LOS-ridgedmulti-noise">ridgedmulti-noise</a></li>
</ul>
<p>Noise creation requires detailed configuration which is simple map of following keys:</p>
<ul>
<li><code>:seed</code> - seed as integer</li>
<li><code>:noise-type</code> - type of noise: <code>:value</code>, <code>:gradient</code> (default), <code>:simplex</code></li>
<li><code>:interpolation</code> - type of interpolation (for value and gradient): <code>:none</code>, <code>:linear</code>, <code>:hermite</code> (default) or <code>:quintic</code></li>
<li><code>:octaves</code> - number of octaves for combined noise (like FBM), default: 6</li>
<li><code>:lacunarity</code> - scaling factor for combined noise, default: 2.00</li>
<li><code>:gain</code> - amplitude scaling factor for combined noise, default: 0.5</li>
<li><code>:normalize?</code> - should be normalized to <code>[0,1]</code> range (true, default) or to <code>[-1,1]</code> range (false)</li>
</ul>
<p>For usage convenience 3 ready to use functions are prepared. Returning value from <code>[0,1]</code> range:</p>
<ul>
<li><a href="#LOS-noise">noise</a> - Perlin Noise (gradient noise, 6 octaves, quintic interpolation)</li>
<li><a href="#LOS-vnoise">vnoise</a> - Value Noise (as in Processing, 6 octaves, hermite interpolation)</li>
<li><a href="#LOS-simplex">simplex</a> - Simplex Noise (6 octaves)</li>
</ul>
<p>For random noise generation you can use <a href="#LOS-random-noise-cfg">random-noise-cfg</a> and <a href="#LOS-random-noise-fn">random-noise-fn</a>. Both can be feed with configuration. Additional configuration:</p>
<ul>
<li><code>:generator</code> can be set to one of the noise variants, defaults to <code>:fbm</code></li>
<li><code>:warp-scale</code> - 0.0 - do not warp, &gt;0.0 warp</li>
<li><code>:warp-depth</code> - depth for warp (default 1.0, if warp-scale is positive)</li>
</ul>
<p>#### Discrete Noise</p>
<p><a href="#LOS-discrete-noise">discrete-noise</a> is a 1d or 2d hash function for given integers. Returns double from <code>[0,1]</code> range.</p>
<p>### Distribution</p>
<p>Various real and integer distributions. See <a href="#LOS-DistributionProto">DistributionProto</a> and <a href="#LOS-RNGProto">RNGProto</a> for functions.</p>
<p>To create distribution call <a href="#LOS-distribution">distribution</a> multimethod with name as a keyword and map as parameters.</p>
<span id="#LOS-->seq"></span>
<section id="seq" class="level4">
<h4 class="anchored" data-anchor-id="seq">-&gt;seq</h4>
<ul>
<li><code>(-&gt;seq)</code></li>
<li><code>(-&gt;seq rng)</code></li>
<li><code>(-&gt;seq rng n)</code></li>
<li><code>(-&gt;seq rng n sampling-method)</code></li>
</ul>
<p>Returns lazy sequence of random samples (can be limited to optional <code>n</code> values).</p>
<p>Additionally one of the sampling methods can be provided, ie: <code>:uniform</code>, <code>:antithetic</code>, <code>:systematic</code> and <code>:stratified</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L2376">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ball-random"></span>
</section>
<section id="ball-random" class="level4">
<h4 class="anchored" data-anchor-id="ball-random">ball-random</h4>
<ul>
<li><code>(ball-random dims)</code></li>
<li><code>(ball-random rng dims)</code></li>
</ul>
<p>Return random vector from a ball</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L432">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-billow-noise"></span>
</section>
<section id="billow-noise" class="level4">
<h4 class="anchored" data-anchor-id="billow-noise">billow-noise</h4>
<ul>
<li><code>(billow-noise)</code></li>
<li><code>(billow-noise cfg__61329__auto__)</code></li>
</ul>
<p>Create billow-noise function with optional configuration.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L628">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-brand"></span>
</section>
<section id="brand" class="level4">
<h4 class="anchored" data-anchor-id="brand">brand</h4>
<p>Random boolean with default RNG.</p>
<p>Returns true or false with equal probability. You can set <code>p</code> probability for <code>true</code></p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L317">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-brandom"></span>
</section>
<section id="brandom" class="level4">
<h4 class="anchored" data-anchor-id="brandom">brandom</h4>
<ul>
<li><code>(brandom rng)</code></li>
<li><code>(brandom rng p)</code></li>
</ul>
<p>Random boolean with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L216">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ccdf"></span>
</section>
<section id="ccdf" class="level4">
<h4 class="anchored" data-anchor-id="ccdf">ccdf</h4>
<ul>
<li><code>(ccdf d v)</code></li>
</ul>
<p>Complementary cumulative probability.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L761">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-cdf"></span>
</section>
<section id="cdf" class="level4">
<h4 class="anchored" data-anchor-id="cdf">cdf</h4>
<ul>
<li><code>(cdf d v)</code></li>
<li><code>(cdf d v1 v2)</code></li>
</ul>
<p>Cumulative probability.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L756">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-continuous?"></span>
</section>
<section id="continuous-1" class="level4">
<h4 class="anchored" data-anchor-id="continuous-1">continuous?</h4>
<ul>
<li><code>(continuous? d)</code></li>
</ul>
<p>Does distribution support continuous domain?</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L793">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-covariance"></span>
</section>
<section id="covariance" class="level4">
<h4 class="anchored" data-anchor-id="covariance">covariance</h4>
<ul>
<li><code>(covariance d)</code></li>
</ul>
<p>Distribution covariance matrix (for multivariate distributions)</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L831">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-default-normal"></span>
</section>
<section id="default-normal-1" class="level4">
<h4 class="anchored" data-anchor-id="default-normal-1">default-normal</h4>
<p>Default normal distribution (u=0.0, sigma=1.0).</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L2074">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-default-rng"></span>
</section>
<section id="default-rng" class="level4">
<h4 class="anchored" data-anchor-id="default-rng">default-rng</h4>
<p>Default RNG - JDK</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L315">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-dimensions"></span>
</section>
<section id="dimensions" class="level4">
<h4 class="anchored" data-anchor-id="dimensions">dimensions</h4>
<ul>
<li><code>(dimensions d)</code></li>
</ul>
<p>Distribution dimensionality</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L785">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-discrete-noise"></span>
</section>
<section id="discrete-noise-1" class="level4">
<h4 class="anchored" data-anchor-id="discrete-noise-1">discrete-noise</h4>
<ul>
<li><code>(discrete-noise X Y)</code></li>
<li><code>(discrete-noise X)</code></li>
</ul>
<p>Discrete noise. Parameters:</p>
<ul>
<li>X (long)</li>
<li>Y (long, optional)</li>
</ul>
<p>Returns double value from [0,1] range</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L725">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-distribution"></span>
</section>
<section id="distribution" class="level4">
<h4 class="anchored" data-anchor-id="distribution">distribution</h4>
<p>Create distribution object.</p>
<ul>
<li>First parameter is distribution as a <code>:key</code>.</li>
<li>Second parameter is a map with configuration.</li>
</ul>
<p>All distributions accept <code>rng</code> under <code>:rng</code> key (default: <a href="#LOS-default-rng">default-rng</a>) and some of them accept <code>inverse-cumm-accuracy</code> (default set to <code>1e-9</code>).</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L737">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-distribution-id"></span>
</section>
<section id="distribution-id" class="level4">
<h4 class="anchored" data-anchor-id="distribution-id">distribution-id</h4>
<ul>
<li><code>(distribution-id d)</code></li>
</ul>
<p>Distribution identifier as keyword.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L843">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-distribution-parameters"></span>
</section>
<section id="distribution-parameters" class="level4">
<h4 class="anchored" data-anchor-id="distribution-parameters">distribution-parameters</h4>
<ul>
<li><code>(distribution-parameters d)</code></li>
<li><code>(distribution-parameters d all?)</code></li>
</ul>
<p>Distribution highest supported value.</p>
<p>When <code>all?</code> is true, technical parameters are included, ie: <code>:rng</code> and <code>:inverser-cumm-accuracy</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L847">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-distribution?"></span>
</section>
<section id="distribution-1" class="level4">
<h4 class="anchored" data-anchor-id="distribution-1">distribution?</h4>
<ul>
<li><code>(distribution? distr)</code></li>
</ul>
<p>Checks if <code>distr</code> is a distribution object.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L750">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-distributions-list"></span>
</section>
<section id="distributions-list" class="level4">
<h4 class="anchored" data-anchor-id="distributions-list">distributions-list</h4>
<p>List of distributions.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L2311">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-drand"></span>
</section>
<section id="drand" class="level4">
<h4 class="anchored" data-anchor-id="drand">drand</h4>
<ul>
<li><code>(drand)</code></li>
<li><code>(drand mx)</code></li>
<li><code>(drand mn mx)</code></li>
</ul>
<p>Random double number with default RNG.</p>
<p>As default returns random double from <code>[0,1)</code> range. When <code>mx</code> is passed, range is set to <code>[0, mx)</code>. When <code>mn</code> is passed, range is set to <code>[mn, mx)</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L331">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-drandom"></span>
</section>
<section id="drandom" class="level4">
<h4 class="anchored" data-anchor-id="drandom">drandom</h4>
<ul>
<li><code>(drandom rng)</code></li>
<li><code>(drandom rng mx)</code></li>
<li><code>(drandom rng mn mx)</code></li>
</ul>
<p>Random double number with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L192">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-fbm-noise"></span>
</section>
<section id="fbm-noise" class="level4">
<h4 class="anchored" data-anchor-id="fbm-noise">fbm-noise</h4>
<ul>
<li><code>(fbm-noise)</code></li>
<li><code>(fbm-noise cfg__61329__auto__)</code></li>
</ul>
<p>Create fbm-noise function with optional configuration.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L627">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-flip"></span>
</section>
<section id="flip" class="level4">
<h4 class="anchored" data-anchor-id="flip">flip</h4>
<ul>
<li><code>(flip p)</code></li>
<li><code>(flip)</code></li>
</ul>
<p>Returns 1 with given probability, 0 otherwise</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L378">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-flip-rng"></span>
</section>
<section id="flip-rng" class="level4">
<h4 class="anchored" data-anchor-id="flip-rng">flip-rng</h4>
<ul>
<li><code>(flip-rng rng p)</code></li>
<li><code>(flip-rng rng)</code></li>
</ul>
<p>Returns 1 with given probability, 0 otherwise, for given rng</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L410">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-flipb"></span>
</section>
<section id="flipb" class="level4">
<h4 class="anchored" data-anchor-id="flipb">flipb</h4>
<ul>
<li><code>(flipb p)</code></li>
<li><code>(flipb)</code></li>
</ul>
<p>Returns true with given probability, false otherwise</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L385">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-flipb-rng"></span>
</section>
<section id="flipb-rng" class="level4">
<h4 class="anchored" data-anchor-id="flipb-rng">flipb-rng</h4>
<ul>
<li><code>(flipb-rng rng p)</code></li>
<li><code>(flipb-rng rng)</code></li>
</ul>
<p>Returns true with given probability, false otherwise, for given rng</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L417">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-frand"></span>
</section>
<section id="frand" class="level4">
<h4 class="anchored" data-anchor-id="frand">frand</h4>
<ul>
<li><code>(frand)</code></li>
<li><code>(frand mx)</code></li>
<li><code>(frand mn mx)</code></li>
</ul>
<p>Random double number with default RNG.</p>
<p>As default returns random float from <code>[0,1)</code> range. When <code>mx</code> is passed, range is set to <code>[0, mx)</code>. When <code>mn</code> is passed, range is set to <code>[mn, mx)</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L322">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-frandom"></span>
</section>
<section id="frandom" class="level4">
<h4 class="anchored" data-anchor-id="frandom">frandom</h4>
<ul>
<li><code>(frandom rng)</code></li>
<li><code>(frandom rng mx)</code></li>
<li><code>(frandom rng mn mx)</code></li>
</ul>
<p>Random double number with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L186">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-grand"></span>
</section>
<section id="grand" class="level4">
<h4 class="anchored" data-anchor-id="grand">grand</h4>
<ul>
<li><code>(grand)</code></li>
<li><code>(grand stddev)</code></li>
<li><code>(grand mean stddev)</code></li>
</ul>
<p>Random gaussian double number with default RNG.</p>
<p>As default returns random double from <code>N(0,1)</code>. When <code>std</code> is passed, <code>N(0,std)</code> is used. When <code>mean</code> is passed, distribution is set to <code>N(mean, std)</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L340">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-grandom"></span>
</section>
<section id="grandom" class="level4">
<h4 class="anchored" data-anchor-id="grandom">grandom</h4>
<ul>
<li><code>(grandom rng)</code></li>
<li><code>(grandom rng stddev)</code></li>
<li><code>(grandom rng mean stddev)</code></li>
</ul>
<p>Random gaussian double number with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L198">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-icdf"></span>
</section>
<section id="icdf" class="level4">
<h4 class="anchored" data-anchor-id="icdf">icdf</h4>
<ul>
<li><code>(icdf d v)</code></li>
</ul>
<p>Inverse cumulative probability</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L773">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-integrate-pdf"></span>
</section>
<section id="integrate-pdf" class="level4">
<h4 class="anchored" data-anchor-id="integrate-pdf">integrate-pdf</h4>
<ul>
<li><code>(integrate-pdf pdf-func mn mx steps)</code></li>
<li><code>(integrate-pdf pdf-func {:keys [mn mx steps interpolator], :or {mn 0.0, mx 1.0, steps 1000, interpolator :linear}, :as options})</code></li>
</ul>
<p>Integrate PDF function, returns CDF and iCDF</p>
<p>Parameters: * <code>pdf-func</code> - univariate function * <code>mn</code> - lower bound for integration, value of pdf-func should be 0.0 at this point * <code>mx</code> - upper bound for integration * <code>steps</code> - how much subintervals to integrate (default 1000) * <code>interpolator</code> - interpolation method between integrated points (default :linear)</p>
<p>Also other integration related parameters are accepted (<code>:gauss-kronrod</code> integration is used).</p>
<p>Possible interpolation methods: <code>:linear</code> (default), <code>:spline</code>, <code>:monotone</code> or any function from <code>fastmath.interpolation</code></p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L861">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-irand"></span>
</section>
<section id="irand" class="level4">
<h4 class="anchored" data-anchor-id="irand">irand</h4>
<ul>
<li><code>(irand)</code></li>
<li><code>(irand mx)</code></li>
<li><code>(irand mn mx)</code></li>
</ul>
<p>Random integer number with default RNG.</p>
<p>As default returns random integer from full integer range. When <code>mx</code> is passed, range is set to <code>[0, mx)</code>. When <code>mn</code> is passed, range is set to <code>[mn, mx)</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L349">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-irandom"></span>
</section>
<section id="irandom" class="level4">
<h4 class="anchored" data-anchor-id="irandom">irandom</h4>
<ul>
<li><code>(irandom rng)</code></li>
<li><code>(irandom rng mx)</code></li>
<li><code>(irandom rng mn mx)</code></li>
</ul>
<p>Random integer number with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L204">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-jittered-sequence-generator"></span>
</section>
<section id="jittered-sequence-generator" class="level4">
<h4 class="anchored" data-anchor-id="jittered-sequence-generator">jittered-sequence-generator</h4>
<ul>
<li><code>(jittered-sequence-generator seq-generator dimensions)</code></li>
<li><code>(jittered-sequence-generator seq-generator dimensions jitter)</code></li>
</ul>
<p>Create jittered sequence generator.</p>
<p>Suitable for <code>:r2</code>, <code>:sobol</code> and <code>:halton</code> sequences.</p>
<p><code>jitter</code> parameter range is from <code>0</code> (no jitter) to <code>1</code> (full jitter). Default: 0.25.</p>
<p>See also <a href="#LOS-sequence-generator">sequence-generator</a>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L528">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-likelihood"></span>
</section>
<section id="likelihood" class="level4">
<h4 class="anchored" data-anchor-id="likelihood">likelihood</h4>
<ul>
<li><code>(likelihood d vs)</code></li>
</ul>
<p>Likelihood of samples</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L814">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-log-likelihood"></span>
</section>
<section id="log-likelihood" class="level4">
<h4 class="anchored" data-anchor-id="log-likelihood">log-likelihood</h4>
<ul>
<li><code>(log-likelihood d vs)</code></li>
</ul>
<p>Log likelihood of samples</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L802">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-lower-bound"></span>
</section>
<section id="lower-bound" class="level4">
<h4 class="anchored" data-anchor-id="lower-bound">lower-bound</h4>
<ul>
<li><code>(lower-bound d)</code></li>
</ul>
<p>Distribution lowest supported value</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L835">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-lpdf"></span>
</section>
<section id="lpdf" class="level4">
<h4 class="anchored" data-anchor-id="lpdf">lpdf</h4>
<ul>
<li><code>(lpdf d v)</code></li>
</ul>
<p>Log density</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L769">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-lrand"></span>
</section>
<section id="lrand" class="level4">
<h4 class="anchored" data-anchor-id="lrand">lrand</h4>
<ul>
<li><code>(lrand)</code></li>
<li><code>(lrand mx)</code></li>
<li><code>(lrand mn mx)</code></li>
</ul>
<p>Random long number with default RNG.</p>
<p>As default returns random long from full integer range. When <code>mx</code> is passed, range is set to <code>[0, mx)</code>. When <code>mn</code> is passed, range is set to <code>[mn, mx)</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L358">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-lrandom"></span>
</section>
<section id="lrandom" class="level4">
<h4 class="anchored" data-anchor-id="lrandom">lrandom</h4>
<ul>
<li><code>(lrandom rng)</code></li>
<li><code>(lrandom rng mx)</code></li>
<li><code>(lrandom rng mn mx)</code></li>
</ul>
<p>Random long number with provided RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L210">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-mean"></span>
</section>
<section id="mean" class="level4">
<h4 class="anchored" data-anchor-id="mean">mean</h4>
<ul>
<li><code>(mean d)</code></li>
</ul>
<p>Distribution mean</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L819">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-means"></span>
</section>
<section id="means" class="level4">
<h4 class="anchored" data-anchor-id="means">means</h4>
<ul>
<li><code>(means d)</code></li>
</ul>
<p>Distribution means (for multivariate distributions)</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L823">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-noise"></span>
</section>
<section id="noise-1" class="level4">
<h4 class="anchored" data-anchor-id="noise-1">noise</h4>
<ul>
<li><code>(noise x)</code></li>
<li><code>(noise x y)</code></li>
<li><code>(noise x y z)</code></li>
</ul>
<p>Improved Perlin Noise.</p>
<p>6 octaves, quintic interpolation.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L599">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-noise-generators"></span>
</section>
<section id="noise-generators" class="level4">
<h4 class="anchored" data-anchor-id="noise-generators">noise-generators</h4>
<p>List of possible noise generators as a map of names and functions.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L686">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-noise-interpolations"></span>
</section>
<section id="noise-interpolations" class="level4">
<h4 class="anchored" data-anchor-id="noise-interpolations">noise-interpolations</h4>
<p>List of possible noise interpolations as a map of names and values.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L556">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-noise-types"></span>
</section>
<section id="noise-types" class="level4">
<h4 class="anchored" data-anchor-id="noise-types">noise-types</h4>
<p>List of possible noise types as a map of names and values.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L562">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-observe"></span>
</section>
<section id="observe-macro" class="level4">
<h4 class="anchored" data-anchor-id="observe-macro">observe <sup><sub>MACRO</sub></sup></h4>
<ul>
<li><code>(observe d vs)</code></li>
</ul>
<p>Log likelihood of samples. Alias for <a href="#LOS-log-likelihood">log-likelihood</a>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L809">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-observe1"></span>
</section>
<section id="observe1" class="level4">
<h4 class="anchored" data-anchor-id="observe1">observe1</h4>
<ul>
<li><code>(observe1 d v)</code></li>
</ul>
<p>Log of probability/density of the value. Alias for <a href="#LOS-lpdf">lpdf</a>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L797">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-pdf"></span>
</section>
<section id="pdf" class="level4">
<h4 class="anchored" data-anchor-id="pdf">pdf</h4>
<ul>
<li><code>(pdf d v)</code></li>
</ul>
<p>Density</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L765">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-probability"></span>
</section>
<section id="probability" class="level4">
<h4 class="anchored" data-anchor-id="probability">probability</h4>
<ul>
<li><code>(probability d v)</code></li>
</ul>
<p>Probability (PMF)</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L777">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-random-noise-cfg"></span>
</section>
<section id="random-noise-cfg" class="level4">
<h4 class="anchored" data-anchor-id="random-noise-cfg">random-noise-cfg</h4>
<ul>
<li><code>(random-noise-cfg pre-config)</code></li>
<li><code>(random-noise-cfg)</code></li>
</ul>
<p>Create random noise configuration.</p>
<p>Optional map with fixed values.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L693">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-random-noise-fn"></span>
</section>
<section id="random-noise-fn" class="level4">
<h4 class="anchored" data-anchor-id="random-noise-fn">random-noise-fn</h4>
<ul>
<li><code>(random-noise-fn cfg)</code></li>
<li><code>(random-noise-fn)</code></li>
</ul>
<p>Create random noise function from all possible options.</p>
<p>Optionally provide own configuration <code>cfg</code>. In this case one of 4 different blending methods will be selected.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L710">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-randval"></span>
</section>
<section id="randval-macro" class="level4">
<h4 class="anchored" data-anchor-id="randval-macro">randval <sup><sub>MACRO</sub></sup></h4>
<ul>
<li><code>(randval v1 v2)</code></li>
<li><code>(randval prob v1 v2)</code></li>
<li><code>(randval prob)</code></li>
<li><code>(randval)</code></li>
</ul>
<p>Return value with given probability (default 0.5)</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L367">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-randval-rng"></span>
</section>
<section id="randval-rng-macro" class="level4">
<h4 class="anchored" data-anchor-id="randval-rng-macro">randval-rng <sup><sub>MACRO</sub></sup></h4>
<ul>
<li><code>(randval-rng rng v1 v2)</code></li>
<li><code>(randval-rng rng prob v1 v2)</code></li>
<li><code>(randval-rng rng prob)</code></li>
<li><code>(randval-rng rng)</code></li>
</ul>
<p>Return value with given probability (default 0.5), for given rng</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L399">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ridgedmulti-noise"></span>
</section>
<section id="ridgedmulti-noise" class="level4">
<h4 class="anchored" data-anchor-id="ridgedmulti-noise">ridgedmulti-noise</h4>
<ul>
<li><code>(ridgedmulti-noise)</code></li>
<li><code>(ridgedmulti-noise cfg__61329__auto__)</code></li>
</ul>
<p>Create ridgedmulti-noise function with optional configuration.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L629">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-rng"></span>
</section>
<section id="rng" class="level4">
<h4 class="anchored" data-anchor-id="rng">rng</h4>
<p>Create RNG for given name (as keyword) and optional seed. Return object enhanced with <a href="#LOS-RNGProto">RNGProto</a>. See: <a href="#LOS-rngs-list">rngs-list</a> for names.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L141">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-rngs-list"></span>
</section>
<section id="rngs-list" class="level4">
<h4 class="anchored" data-anchor-id="rngs-list">rngs-list</h4>
<p>List of all possible RNGs.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L182">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-roll-a-dice"></span>
</section>
<section id="roll-a-dice" class="level4">
<h4 class="anchored" data-anchor-id="roll-a-dice">roll-a-dice</h4>
<ul>
<li><code>(roll-a-dice sides)</code></li>
<li><code>(roll-a-dice dices sides)</code></li>
</ul>
<p>Roll a dice with given sides</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L390">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-roll-a-dice-rng"></span>
</section>
<section id="roll-a-dice-rng" class="level4">
<h4 class="anchored" data-anchor-id="roll-a-dice-rng">roll-a-dice-rng</h4>
<ul>
<li><code>(roll-a-dice-rng rng sides)</code></li>
<li><code>(roll-a-dice-rng rng dices sides)</code></li>
</ul>
<p>Roll a dice with given sides and given rng</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L422">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-sample"></span>
</section>
<section id="sample" class="level4">
<h4 class="anchored" data-anchor-id="sample">sample</h4>
<ul>
<li><code>(sample d)</code></li>
</ul>
<p>Random sample</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L781">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-sequence-generator"></span>
</section>
<section id="sequence-generator" class="level4">
<h4 class="anchored" data-anchor-id="sequence-generator">sequence-generator</h4>
<p>Create Sequence generator. See <a href="#LOS-sequence-generators-list">sequence-generators-list</a> for names.</p>
<p>Values:</p>
<ul>
<li><code>:r2</code>, <code>:halton</code>, <code>:sobol</code>, <code>:default</code>/<code>:uniform</code> - range <code>[0-1] for each dimension</code></li>
<li><code>:gaussian</code> - from <code>N(0,1)</code> distribution</li>
<li><code>:sphere</code> - from surface of unit sphere (ie. euclidean distance from origin equals 1.0)</li>
<li><code>:ball</code> - from an unit ball</li>
</ul>
<p>Possible dimensions:</p>
<ul>
<li><code>:r2</code> - 1-15</li>
<li><code>:halton</code> - 1-40</li>
<li><code>:sobol</code> - 1-1000</li>
<li>the rest - 1+</li>
</ul>
<p>See also <a href="#LOS-jittered-sequence-generator">jittered-sequence-generator</a>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L500">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-sequence-generators-list"></span>
</section>
<section id="sequence-generators-list" class="level4">
<h4 class="anchored" data-anchor-id="sequence-generators-list">sequence-generators-list</h4>
<p>List of random sequence generator. See <a href="#LOS-sequence-generator">sequence-generator</a>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L551">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-set-seed"></span>
</section>
<section id="set-seed" class="level4">
<h4 class="anchored" data-anchor-id="set-seed">set-seed</h4>
<ul>
<li><code>(set-seed)</code></li>
<li><code>(set-seed v)</code></li>
<li><code>(set-seed rng v)</code></li>
</ul>
<p>Create and return new RNG</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L2316">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-set-seed!"></span>
</section>
<section id="set-seed-1" class="level4">
<h4 class="anchored" data-anchor-id="set-seed-1">set-seed!</h4>
<ul>
<li><code>(set-seed!)</code></li>
<li><code>(set-seed! v)</code></li>
<li><code>(set-seed! rng v)</code></li>
</ul>
<p>Sets seed.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L2325">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-simplex"></span>
</section>
<section id="simplex" class="level4">
<h4 class="anchored" data-anchor-id="simplex">simplex</h4>
<ul>
<li><code>(simplex x)</code></li>
<li><code>(simplex x y)</code></li>
<li><code>(simplex x y z)</code></li>
</ul>
<p>Simplex noise. 6 octaves.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L607">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-single-noise"></span>
</section>
<section id="single-noise" class="level4">
<h4 class="anchored" data-anchor-id="single-noise">single-noise</h4>
<ul>
<li><code>(single-noise)</code></li>
<li><code>(single-noise cfg__61329__auto__)</code></li>
</ul>
<p>Create single-noise function with optional configuration.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L626">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-source-object"></span>
</section>
<section id="source-object" class="level4">
<h4 class="anchored" data-anchor-id="source-object">source-object</h4>
<ul>
<li><code>(source-object d)</code></li>
</ul>
<p>Returns Java or proxy object from backend library (if available)</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L789">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-synced-rng"></span>
</section>
<section id="synced-rng" class="level4">
<h4 class="anchored" data-anchor-id="synced-rng">synced-rng</h4>
<ul>
<li><code>(synced-rng m)</code></li>
<li><code>(synced-rng m seed)</code></li>
</ul>
<p>Create synchronized RNG for given name and optional seed. Wraps <a href="#LOS-rng">rng</a> method.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L176">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-upper-bound"></span>
</section>
<section id="upper-bound" class="level4">
<h4 class="anchored" data-anchor-id="upper-bound">upper-bound</h4>
<ul>
<li><code>(upper-bound d)</code></li>
</ul>
<p>Distribution highest supported value</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L839">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-variance"></span>
</section>
<section id="variance" class="level4">
<h4 class="anchored" data-anchor-id="variance">variance</h4>
<ul>
<li><code>(variance d)</code></li>
</ul>
<p>Distribution variance</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L827">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-vnoise"></span>
</section>
<section id="vnoise" class="level4">
<h4 class="anchored" data-anchor-id="vnoise">vnoise</h4>
<ul>
<li><code>(vnoise x)</code></li>
<li><code>(vnoise x y)</code></li>
<li><code>(vnoise x y z)</code></li>
</ul>
<p>Value Noise.</p>
<p>6 octaves, Hermite interpolation (cubic, h01).</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L591">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-warp-noise-fn"></span>
</section>
<section id="warp-noise-fn" class="level4">
<h4 class="anchored" data-anchor-id="warp-noise-fn">warp-noise-fn</h4>
<ul>
<li><code>(warp-noise-fn noise scale depth)</code></li>
<li><code>(warp-noise-fn noise scale)</code></li>
<li><code>(warp-noise-fn noise)</code></li>
<li><code>(warp-noise-fn)</code></li>
</ul>
<p>Create warp noise (see <a href="http://www.iquilezles.org/www/articles/warp/warp.htm">Inigo Quilez article</a>).</p>
<p>Parameters:</p>
<ul>
<li>noise function, default: vnoise</li>
<li>scale factor, default: 4.0</li>
<li>depth (1 or 2), default 1</li>
</ul>
<p>Normalization of warp noise depends on normalization of noise function.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/random.clj#L664">source</a></small><hr style="margin: 0"></div>
<div style="background-color:grey;height:2px;width:100%;"></div>
<div><pre><small><small>source: <a href="https://github.com/generateme/fastmath//blob/master/clay/random.clj">clay/random.clj</a></small></small></pre></div>


</section>
</section>
</section>

</main> <!-- /main -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
  const toggleBodyColorMode = (bsSheetEl) => {
    const mode = bsSheetEl.getAttribute("data-mode");
    const bodyEl = window.document.querySelector("body");
    if (mode === "dark") {
      bodyEl.classList.add("quarto-dark");
      bodyEl.classList.remove("quarto-light");
    } else {
      bodyEl.classList.add("quarto-light");
      bodyEl.classList.remove("quarto-dark");
    }
  }
  const toggleBodyColorPrimary = () => {
    const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
    if (bsSheetEl) {
      toggleBodyColorMode(bsSheetEl);
    }
  }
  toggleBodyColorPrimary();  
  const icon = "";
  const anchorJS = new window.AnchorJS();
  anchorJS.options = {
    placement: 'right',
    icon: icon
  };
  anchorJS.add('.anchored');
  const isCodeAnnotation = (el) => {
    for (const clz of el.classList) {
      if (clz.startsWith('code-annotation-')) {                     
        return true;
      }
    }
    return false;
  }
  const clipboard = new window.ClipboardJS('.code-copy-button', {
    text: function(trigger) {
      const codeEl = trigger.previousElementSibling.cloneNode(true);
      for (const childEl of codeEl.children) {
        if (isCodeAnnotation(childEl)) {
          childEl.remove();
        }
      }
      return codeEl.innerText;
    }
  });
  clipboard.on('success', function(e) {
    // button target
    const button = e.trigger;
    // don't keep focus
    button.blur();
    // flash "checked"
    button.classList.add('code-copy-button-checked');
    var currentTitle = button.getAttribute("title");
    button.setAttribute("title", "Copied!");
    let tooltip;
    if (window.bootstrap) {
      button.setAttribute("data-bs-toggle", "tooltip");
      button.setAttribute("data-bs-placement", "left");
      button.setAttribute("data-bs-title", "Copied!");
      tooltip = new bootstrap.Tooltip(button, 
        { trigger: "manual", 
          customClass: "code-copy-button-tooltip",
          offset: [0, -8]});
      tooltip.show();    
    }
    setTimeout(function() {
      if (tooltip) {
        tooltip.hide();
        button.removeAttribute("data-bs-title");
        button.removeAttribute("data-bs-toggle");
        button.removeAttribute("data-bs-placement");
      }
      button.setAttribute("title", currentTitle);
      button.classList.remove('code-copy-button-checked');
    }, 1000);
    // clear code selection
    e.clearSelection();
  });
  function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
    const config = {
      allowHTML: true,
      maxWidth: 500,
      delay: 100,
      arrow: false,
      appendTo: function(el) {
          return el.parentElement;
      },
      interactive: true,
      interactiveBorder: 10,
      theme: 'quarto',
      placement: 'bottom-start',
    };
    if (contentFn) {
      config.content = contentFn;
    }
    if (onTriggerFn) {
      config.onTrigger = onTriggerFn;
    }
    if (onUntriggerFn) {
      config.onUntrigger = onUntriggerFn;
    }
    window.tippy(el, config); 
  }
  const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
  for (var i=0; i<noterefs.length; i++) {
    const ref = noterefs[i];
    tippyHover(ref, function() {
      // use id or data attribute instead here
      let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
      try { href = new URL(href).hash; } catch {}
      const id = href.replace(/^#\/?/, "");
      const note = window.document.getElementById(id);
      return note.innerHTML;
    });
  }
  const xrefs = window.document.querySelectorAll('a.quarto-xref');
  const processXRef = (id, note) => {
    // Strip column container classes
    const stripColumnClz = (el) => {
      el.classList.remove("page-full", "page-columns");
      if (el.children) {
        for (const child of el.children) {
          stripColumnClz(child);
        }
      }
    }
    stripColumnClz(note)
    if (id === null || id.startsWith('sec-')) {
      // Special case sections, only their first couple elements
      const container = document.createElement("div");
      if (note.children && note.children.length > 2) {
        container.appendChild(note.children[0].cloneNode(true));
        for (let i = 1; i < note.children.length; i++) {
          const child = note.children[i];
          if (child.tagName === "P" && child.innerText === "") {
            continue;
          } else {
            container.appendChild(child.cloneNode(true));
            break;
          }
        }
        if (window.Quarto?.typesetMath) {
          window.Quarto.typesetMath(container);
        }
        return container.innerHTML
      } else {
        if (window.Quarto?.typesetMath) {
          window.Quarto.typesetMath(note);
        }
        return note.innerHTML;
      }
    } else {
      // Remove any anchor links if they are present
      const anchorLink = note.querySelector('a.anchorjs-link');
      if (anchorLink) {
        anchorLink.remove();
      }
      if (window.Quarto?.typesetMath) {
        window.Quarto.typesetMath(note);
      }
      // TODO in 1.5, we should make sure this works without a callout special case
      if (note.classList.contains("callout")) {
        return note.outerHTML;
      } else {
        return note.innerHTML;
      }
    }
  }
  for (var i=0; i<xrefs.length; i++) {
    const xref = xrefs[i];
    tippyHover(xref, undefined, function(instance) {
      instance.disable();
      let url = xref.getAttribute('href');
      let hash = undefined; 
      if (url.startsWith('#')) {
        hash = url;
      } else {
        try { hash = new URL(url).hash; } catch {}
      }
      if (hash) {
        const id = hash.replace(/^#\/?/, "");
        const note = window.document.getElementById(id);
        if (note !== null) {
          try {
            const html = processXRef(id, note.cloneNode(true));
            instance.setContent(html);
          } finally {
            instance.enable();
            instance.show();
          }
        } else {
          // See if we can fetch this
          fetch(url.split('#')[0])
          .then(res => res.text())
          .then(html => {
            const parser = new DOMParser();
            const htmlDoc = parser.parseFromString(html, "text/html");
            const note = htmlDoc.getElementById(id);
            if (note !== null) {
              const html = processXRef(id, note);
              instance.setContent(html);
            } 
          }).finally(() => {
            instance.enable();
            instance.show();
          });
        }
      } else {
        // See if we can fetch a full url (with no hash to target)
        // This is a special case and we should probably do some content thinning / targeting
        fetch(url)
        .then(res => res.text())
        .then(html => {
          const parser = new DOMParser();
          const htmlDoc = parser.parseFromString(html, "text/html");
          const note = htmlDoc.querySelector('main.content');
          if (note !== null) {
            // This should only happen for chapter cross references
            // (since there is no id in the URL)
            // remove the first header
            if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
              note.children[0].remove();
            }
            const html = processXRef(null, note);
            instance.setContent(html);
          } 
        }).finally(() => {
          instance.enable();
          instance.show();
        });
      }
    }, function(instance) {
    });
  }
      let selectedAnnoteEl;
      const selectorForAnnotation = ( cell, annotation) => {
        let cellAttr = 'data-code-cell="' + cell + '"';
        let lineAttr = 'data-code-annotation="' +  annotation + '"';
        const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
        return selector;
      }
      const selectCodeLines = (annoteEl) => {
        const doc = window.document;
        const targetCell = annoteEl.getAttribute("data-target-cell");
        const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
        const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
        const lines = annoteSpan.getAttribute("data-code-lines").split(",");
        const lineIds = lines.map((line) => {
          return targetCell + "-" + line;
        })
        let top = null;
        let height = null;
        let parent = null;
        if (lineIds.length > 0) {
            //compute the position of the single el (top and bottom and make a div)
            const el = window.document.getElementById(lineIds[0]);
            top = el.offsetTop;
            height = el.offsetHeight;
            parent = el.parentElement.parentElement;
          if (lineIds.length > 1) {
            const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
            const bottom = lastEl.offsetTop + lastEl.offsetHeight;
            height = bottom - top;
          }
          if (top !== null && height !== null && parent !== null) {
            // cook up a div (if necessary) and position it 
            let div = window.document.getElementById("code-annotation-line-highlight");
            if (div === null) {
              div = window.document.createElement("div");
              div.setAttribute("id", "code-annotation-line-highlight");
              div.style.position = 'absolute';
              parent.appendChild(div);
            }
            div.style.top = top - 2 + "px";
            div.style.height = height + 4 + "px";
            div.style.left = 0;
            let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
            if (gutterDiv === null) {
              gutterDiv = window.document.createElement("div");
              gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
              gutterDiv.style.position = 'absolute';
              const codeCell = window.document.getElementById(targetCell);
              const gutter = codeCell.querySelector('.code-annotation-gutter');
              gutter.appendChild(gutterDiv);
            }
            gutterDiv.style.top = top - 2 + "px";
            gutterDiv.style.height = height + 4 + "px";
          }
          selectedAnnoteEl = annoteEl;
        }
      };
      const unselectCodeLines = () => {
        const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
        elementsIds.forEach((elId) => {
          const div = window.document.getElementById(elId);
          if (div) {
            div.remove();
          }
        });
        selectedAnnoteEl = undefined;
      };
        // Handle positioning of the toggle
    window.addEventListener(
      "resize",
      throttle(() => {
        elRect = undefined;
        if (selectedAnnoteEl) {
          selectCodeLines(selectedAnnoteEl);
        }
      }, 10)
    );
    function throttle(fn, ms) {
    let throttle = false;
    let timer;
      return (...args) => {
        if(!throttle) { // first call gets through
            fn.apply(this, args);
            throttle = true;
        } else { // all the others get throttled
            if(timer) clearTimeout(timer); // cancel #2
            timer = setTimeout(() => {
              fn.apply(this, args);
              timer = throttle = false;
            }, ms);
        }
      };
    }
      // Attach click handler to the DT
      const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
      for (const annoteDlNode of annoteDls) {
        annoteDlNode.addEventListener('click', (event) => {
          const clickedEl = event.target;
          if (clickedEl !== selectedAnnoteEl) {
            unselectCodeLines();
            const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
            if (activeEl) {
              activeEl.classList.remove('code-annotation-active');
            }
            selectCodeLines(clickedEl);
            clickedEl.classList.add('code-annotation-active');
          } else {
            // Unselect the line
            unselectCodeLines();
            clickedEl.classList.remove('code-annotation-active');
          }
        });
      }
  const findCites = (el) => {
    const parentEl = el.parentElement;
    if (parentEl) {
      const cites = parentEl.dataset.cites;
      if (cites) {
        return {
          el,
          cites: cites.split(' ')
        };
      } else {
        return findCites(el.parentElement)
      }
    } else {
      return undefined;
    }
  };
  var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
  for (var i=0; i<bibliorefs.length; i++) {
    const ref = bibliorefs[i];
    const citeInfo = findCites(ref);
    if (citeInfo) {
      tippyHover(citeInfo.el, function() {
        var popup = window.document.createElement('div');
        citeInfo.cites.forEach(function(cite) {
          var citeDiv = window.document.createElement('div');
          citeDiv.classList.add('hanging-indent');
          citeDiv.classList.add('csl-entry');
          var biblioDiv = window.document.getElementById('ref-' + cite);
          if (biblioDiv) {
            citeDiv.innerHTML = biblioDiv.innerHTML;
          }
          popup.appendChild(citeDiv);
        });
        return popup.innerHTML;
      });
    }
  }
});
</script>
<nav class="page-navigation">
  <div class="nav-page nav-page-previous">
      <a href="./vector_matrix.html" class="pagination-link" aria-label="Vectors and matrices">
        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Vectors and matrices</span>
      </a>          
  </div>
  <div class="nav-page nav-page-next">
      <a href="./stats.html" class="pagination-link" aria-label="Statistics">
        <span class="nav-page-text">Statistics</span> <i class="bi bi-arrow-right-short"></i>
      </a>
  </div>
</nav>
</div> <!-- /content -->




</body></html>